com.bea.wli.sb.transports
Class TransportOptions

java.lang.Object
  extended by com.bea.wli.sb.transports.TransportOptions

public class TransportOptions
extends Object

Used to supply options for sending or receiving a message. Possibly other usages in the future. There are two styles for using TransportOptions: multiline setup, and single-line use. Here are two examples. First, multiline style:

 TransportOptions opts = new TransportOptions();
  opts.setQoS(EXACTLY_ONCE);
  opts.setThrowOnError(true);
 
The alternative is single-line usage:
 new TransportOptions().setQoS(EXACTLY_ONCE).setThrowOnError()));
 


Nested Class Summary
static class TransportOptions.ModeEnum
           
static class TransportOptions.QoSEnum
           
 
Field Summary
static String _URI
           
static String INBOUND_ENDPOINT
           
static String MODE
           
static String OPAQUE_DATA
           
static String OPERATION_NAME
           
static String QOS
           
static String RETRY_COUNT
           
static String RETRY_INTERVAL
           
static String THROW_ON_ERROR
           
 
Constructor Summary
TransportOptions()
           
 
Method Summary
 Object get(Object option)
           
 TransportOptions.ModeEnum getMode()
           
 Map<String,Object> getOpaqueData()
           
 String getOperationName()
           
 TransportOptions.QoSEnum getQoS()
           
 int getRetryCount()
           
 int getRetryInterval()
           
 URI getURI()
           
 boolean hasOption(Object option)
           
static boolean hasOption(TransportOptions options, Object option)
          utility method
 boolean isThrowOnError()
           
 TransportOptions put(Object option)
          set the value of the option with a given key
 TransportOptions put(Object option, int value)
          set the value of the option with a given key to specified value
 TransportOptions put(Object option, Object value)
          set the value of the option with a given key to specified value
 void remove(Object option)
          delete of the option with a given key
static Object safeGet(TransportOptions options, Object option)
          utility method
 TransportOptions setMode(TransportOptions.ModeEnum val)
          specifies the type of the message being processed by ALSB - one-way or request/response.
 TransportOptions setOpaqueData(Map<String,Object> data)
          Stores opaque (i.e.
 TransportOptions setOperationName(String val)
          specifies the name of the Web Service operation, when applicable for outbound requests.
 TransportOptions setQoS(TransportOptions.QoSEnum val)
          specifies whether or not “exactly-once” qualify of service can be achieved.
 TransportOptions setRetryCount(int val)
          specifies the retry count is to used in case of delivery failure when sending outbound requests via a transport provider.
 TransportOptions setRetryInterval(int val)
          specifies the retry interval is to used in case of delivery failure when sending outbound requests via a transport provider.
 TransportOptions setThrowOnError()
          if set, an exception will be thrown to the callee of method TransportManager.receiveMessage() due to an error that occurs during the ALSB pipeline processing.
 TransportOptions setURI(URI val)
          specifies which URI is to be used when sending outbound requests via a transport provider
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

QOS

public static final String QOS
See Also:
Constant Field Values

THROW_ON_ERROR

public static final String THROW_ON_ERROR
See Also:
Constant Field Values

MODE

public static final String MODE
See Also:
Constant Field Values

_URI

public static final String _URI
See Also:
Constant Field Values

RETRY_INTERVAL

public static final String RETRY_INTERVAL
See Also:
Constant Field Values

RETRY_COUNT

public static final String RETRY_COUNT
See Also:
Constant Field Values

OPERATION_NAME

public static final String OPERATION_NAME
See Also:
Constant Field Values

INBOUND_ENDPOINT

public static final String INBOUND_ENDPOINT
See Also:
Constant Field Values

OPAQUE_DATA

public static final String OPAQUE_DATA
See Also:
Constant Field Values
Constructor Detail

TransportOptions

public TransportOptions()
Method Detail

setQoS

public TransportOptions setQoS(TransportOptions.QoSEnum val)
specifies whether or not “exactly-once” qualify of service can be achieved. In case of transport providers that support transactional semantics this means whether transaction will be rolled back in case of an error.


getQoS

public TransportOptions.QoSEnum getQoS()
Returns:
whether or not “exactly-once” qualify of service can be achieved. In case of transport providers that support transactional semantics this means whether transaction will be rolled back in case of an error.

setMode

public TransportOptions setMode(TransportOptions.ModeEnum val)
specifies the type of the message being processed by ALSB - one-way or request/response.


getMode

public TransportOptions.ModeEnum getMode()
Returns:
the type of the message being processed by ALSB - one-way or request/response.

setThrowOnError

public TransportOptions setThrowOnError()
if set, an exception will be thrown to the callee of method TransportManager.receiveMessage() due to an error that occurs during the ALSB pipeline processing. The callee will presumably mark the current transaction for rollback. Otherwise, the router manager will send an appropriate response (e.g. a SOAP fault) in the inbound message context instead of throwing an exception.


isThrowOnError

public boolean isThrowOnError()
Returns:
whether or not an exception will be thrown to the callee of method TransportManager.receiveMessage() due to an error that occurs during the ALSB pipeline processing.

setURI

public TransportOptions setURI(URI val)
specifies which URI is to be used when sending outbound requests via a transport provider


getURI

public URI getURI()
Returns:
which URI is to be used when sending outbound requests via a transport provider

setRetryInterval

public TransportOptions setRetryInterval(int val)
specifies the retry interval is to used in case of delivery failure when sending outbound requests via a transport provider. If present, it overrides the service configuration setting


getRetryInterval

public int getRetryInterval()
Returns:
the retry interval is to used in case of delivery failure when sending outbound requests via a transport provider.

setRetryCount

public TransportOptions setRetryCount(int val)
specifies the retry count is to used in case of delivery failure when sending outbound requests via a transport provider. If present, it overrides the service configuration setting


getRetryCount

public int getRetryCount()
Returns:
the retry count is to used in case of delivery failure when sending outbound requests via a transport provider. If present, it overrides the service configuration setting

setOperationName

public TransportOptions setOperationName(String val)
specifies the name of the Web Service operation, when applicable for outbound requests. It is set my ALSB runtime and passed to transport provider.


getOperationName

public String getOperationName()
Returns:
the name of the Web Service operation, when applicable for outbound requests. It is set my ALSB runtime and passed to transport provider.

setOpaqueData

public TransportOptions setOpaqueData(Map<String,Object> data)
Stores opaque (i.e. unspecified/unstructured) data from transport providers. A typical use case is when a transport provider XYZ receives an inbound message, passes it to ALSB along with some opaque data and ALSB eventually delivers this data to the outbound transport provider, which also happens to be XYZ so it knows precisely how to interpret the data.


getOpaqueData

public Map<String,Object> getOpaqueData()
Returns:
opaque (i.e. unspecified/unstructured) data from transport providers.

hasOption

public boolean hasOption(Object option)
Returns:
whether or not an options with a given key exists

get

public Object get(Object option)
Returns:
the value of the option with a given key

put

public TransportOptions put(Object option)
set the value of the option with a given key


put

public TransportOptions put(Object option,
                            int value)
set the value of the option with a given key to specified value


put

public TransportOptions put(Object option,
                            Object value)
set the value of the option with a given key to specified value


remove

public void remove(Object option)
delete of the option with a given key


safeGet

public static Object safeGet(TransportOptions options,
                             Object option)
utility method

Returns:
the value of the option with a given key

hasOption

public static boolean hasOption(TransportOptions options,
                                Object option)
utility method

Returns:
whether or not the option with a given key exists

toString

public String toString()
Overrides:
toString in class Object
Returns:
string representation of this TransportOptions object