Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Service Bus
11g Release 1 (11.1.1.6.3)

E15033-08


com.bea.wli.sb.transports
Class TransportOptions

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


public class TransportOptions
extends java.lang.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 java.lang.String _URI
           
static java.lang.String BLOCKING_THROTTLING
           
static int DEFAULT_PRIORITY
           
static java.lang.String INBOUND_ENDPOINT
           
static java.lang.String MESSAGE_PRIORITY
           
static java.lang.String MODE
           
static java.lang.String OPAQUE_DATA
           
static java.lang.String OPERATION_NAME
           
static java.lang.String QOS
           
static java.lang.String REPLY_SYNC
           
static java.lang.String REPLY_WITH_FAILURE
           
static java.lang.String RETRY_COUNT
           
static java.lang.String RETRY_INTERVAL
           
static java.lang.String THROW_ON_ERROR
           

 

Constructor Summary
TransportOptions()
           

 

Method Summary
 java.lang.Object get(java.lang.Object option)
           
 int getMessagePriority()
           
 TransportOptions.ModeEnum getMode()
           
 java.util.Map<java.lang.String,java.lang.Object> getOpaqueData()
           
 java.lang.String getOperationName()
           
 TransportOptions.QoSEnum getQoS()
           
 int getRetryCount()
           
 int getRetryInterval()
           
 java.net.URI getURI()
           
 boolean hasOption(java.lang.Object option)
           
static boolean hasOption(TransportOptions options, java.lang.Object option)
          utility method
 boolean isBlockingThrottling()
           
 boolean isReplySync()
           
 boolean isReplyWithFailure()
           
 boolean isThrowOnError()
           
 TransportOptions put(java.lang.Object option)
           
 TransportOptions put(java.lang.Object option, int value)
          set the value of the option with a given key to specified value
 TransportOptions put(java.lang.Object option, java.lang.Object value)
          set the value of the option with a given key to specified value
 void remove(java.lang.Object option)
          delete of the option with a given key
static java.lang.Object safeGet(TransportOptions options, java.lang.Object option)
          utility method
 TransportOptions setBlockingThrottling()
           
 TransportOptions setMessagePriority(int priority)
           
 TransportOptions setMode(TransportOptions.ModeEnum val)
          specifies the type of the message being processed by OSB - one-way or request/response.
 TransportOptions setOpaqueData(java.util.Map<java.lang.String,java.lang.Object> data)
          Stores opaque (i.e.
 TransportOptions setOperationName(java.lang.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 setReplyWithFailure()
           
 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 OSB pipeline processing.
 TransportOptions setURI(java.net.URI val)
          specifies which URI is to be used when sending outbound requests via a transport provider
 java.lang.String toString()
           

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Field Detail

QOS

public static final java.lang.String QOS
See Also:
Constant Field Values

THROW_ON_ERROR

public static final java.lang.String THROW_ON_ERROR
See Also:
Constant Field Values

MODE

public static final java.lang.String MODE
See Also:
Constant Field Values

_URI

public static final java.lang.String _URI
See Also:
Constant Field Values

RETRY_INTERVAL

public static final java.lang.String RETRY_INTERVAL
See Also:
Constant Field Values

RETRY_COUNT

public static final java.lang.String RETRY_COUNT
See Also:
Constant Field Values

OPERATION_NAME

public static final java.lang.String OPERATION_NAME
See Also:
Constant Field Values

INBOUND_ENDPOINT

public static final java.lang.String INBOUND_ENDPOINT
See Also:
Constant Field Values

OPAQUE_DATA

public static final java.lang.String OPAQUE_DATA
See Also:
Constant Field Values

MESSAGE_PRIORITY

public static final java.lang.String MESSAGE_PRIORITY
See Also:
Constant Field Values

BLOCKING_THROTTLING

public static final java.lang.String BLOCKING_THROTTLING
See Also:
Constant Field Values

REPLY_WITH_FAILURE

public static final java.lang.String REPLY_WITH_FAILURE
See Also:
Constant Field Values

REPLY_SYNC

public static final java.lang.String REPLY_SYNC
See Also:
Constant Field Values

DEFAULT_PRIORITY

public static final int DEFAULT_PRIORITY
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.
Parameters:
val - quality of service enum
Returns:
updated tranport options instance.

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 OSB - one-way or request/response.
Parameters:
val - mode
Returns:
updated tranport options instance.

getMode

public TransportOptions.ModeEnum getMode()
Returns:
the type of the message being processed by OSB - 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 OSB 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.
Returns:
updated transport options instance.

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 OSB pipeline processing.

setBlockingThrottling

public TransportOptions setBlockingThrottling()

isBlockingThrottling

public boolean isBlockingThrottling()

isReplyWithFailure

public boolean isReplyWithFailure()
Returns:
whether or not the user has chosen to reply with failure in the message flow of the service. This option gets set by the pipeline runtime and is passed to the inbound transport message context via the close() method

setReplyWithFailure

public TransportOptions setReplyWithFailure()

isReplySync

public boolean isReplySync()
Returns:
whether or not the the response comes in a synchronous fashion. This option gets set by the pipeline runtime when the user enables 'use same Transaction For Response' flag and is passed to the inbound transport message context via the close() method

setURI

public TransportOptions setURI(java.net.URI val)
specifies which URI is to be used when sending outbound requests via a transport provider
Parameters:
val - uri
Returns:
updated transport options instance

getURI

public java.net.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
Parameters:
val - retry interval
Returns:
updated transports options instance.

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
Parameters:
val - retry count
Returns:
updated transports options instance.

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(java.lang.String val)
specifies the name of the Web Service operation, when applicable for outbound requests. It is set my OSB runtime and passed to transport provider.
Parameters:
val - operation name
Returns:
updated transports options instance.

getOperationName

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

setMessagePriority

public TransportOptions setMessagePriority(int priority)

getMessagePriority

public int getMessagePriority()

setOpaqueData

public TransportOptions setOpaqueData(java.util.Map<java.lang.String,java.lang.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 OSB along with some opaque data and OSB eventually delivers this data to the outbound transport provider, which also happens to be XYZ so it knows precisely how to interpret the data.
Parameters:
data - opaque data, a map of object keyed by string.
Returns:
updated transport options instance

getOpaqueData

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

hasOption

public boolean hasOption(java.lang.Object option)
Parameters:
option - option key
Returns:
whether or not an options with a given key exists

get

public java.lang.Object get(java.lang.Object option)
Parameters:
option - option key
Returns:
the value of the option with a given key

put

public TransportOptions put(java.lang.Object option)
Parameters:
option - option key
Returns:
updated transport options instance set the value of the option with a given key to true

put

public TransportOptions put(java.lang.Object option,
                            int value)
set the value of the option with a given key to specified value
Parameters:
option - object representing the option key
value - int value for the given key
Returns:
updated transport options instance

put

public TransportOptions put(java.lang.Object option,
                            java.lang.Object value)
set the value of the option with a given key to specified value
Parameters:
option - object representing the option key
value - object value for the given key
Returns:
updated transport options instance

remove

public void remove(java.lang.Object option)
delete of the option with a given key
Parameters:
option - key

safeGet

public static java.lang.Object safeGet(TransportOptions options,
                                       java.lang.Object option)
utility method
Parameters:
option - key
options - transport options to introspect
Returns:
the value of the option with a given key

hasOption

public static boolean hasOption(TransportOptions options,
                                java.lang.Object option)
utility method
Parameters:
option - key
options - transport options to introspect
Returns:
whether or not the option with a given key exists

toString

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

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Service Bus
11g Release 1 (11.1.1.6.3)

E15033-08


Copyright © 2008, 2012, Oracle. All rights reserved.