org.apache.axis2.client
Class Options

java.lang.Object
  extended byorg.apache.axis2.client.Options

public class Options
extends java.lang.Object

The proposal related for this is here : http://marc.theaimsgroup.com/?l=axis-dev&m=113320384108037&w=2 Client can fill this options and give to any class extending from MEPClient. All those classes will be getting parameters using this.


Field Summary
static java.lang.String COPY_PROPERTIES
           
protected  TransportOutDescription senderTransport
          This is used for sending and receiving messages.
 
Constructor Summary
Options()
           
 
Method Summary
 java.lang.String getAction()
           
 EndpointReference getFaultTo()
           
 EndpointReference getFrom()
           
 TransportListener getListener()
           
 TransportInDescription getListenerTransport()
           
 java.lang.String getListenerTransportProtocol()
           
 java.lang.String getMessageId()
           
 java.util.Map getProperties()
           
 java.lang.Object getProperty(java.lang.String key)
           
 RelatesTo getRelatesTo()
           
 EndpointReference getReplyTo()
           
 TransportOutDescription getSenderTransport()
           
 java.lang.String getSenderTrasportProtocol()
           
 java.lang.String getSoapAction()
           
 java.lang.String getSoapVersionURI()
           
 long getTimeOutInMilliSeconds()
          Gets the wait time after which a client times out in a blocking scenario.
 EndpointReference getTo()
           
 boolean isExceptionToBeThrownOnSOAPFault()
          If there is a SOAP Fault in the body of the incoming SOAP Message, system can be configured to throw an exception with the details extracted from the information from the fault message.
 boolean isUseSeparateListener()
           
 void setAction(java.lang.String action)
           
 void setExceptionToBeThrownOnSOAPFault(boolean exceptionToBeThrownOnSOAPFault)
          If there is a SOAP Fault in the body of the incoming SOAP Message, system can be configured to throw an exception with the details extracted from the information from the fault message.
 void setFaultTo(EndpointReference faultTo)
           
 void setFrom(EndpointReference from)
           
 void setListener(TransportListener listener)
           
 void setListenerTransport(TransportInDescription listenerTransport)
           
 void setListenerTransportProtocol(java.lang.String listenerTransportProtocol)
           
 void setMessageId(java.lang.String messageId)
           
 void setProperties(java.util.Map properties)
          This will set the properties to the context.
 void setProperty(java.lang.String propertyKey, java.lang.Object property)
          Properties you need to pass in to the message context must be set via this.
 void setRelatesTo(RelatesTo relatesTo)
           
 void setReplyTo(EndpointReference replyTo)
           
 void setSenderTransport(java.lang.String senderTransport, AxisConfiguration axisConfiguration)
          Sets the transport to be used for sending the SOAP Message
 void setSenderTransport(TransportOutDescription senderTransport)
           
 void setSoapAction(java.lang.String soapAction)
           
 void setSoapVersionURI(java.lang.String soapVersionURI)
           
 void setTimeOutInMilliSeconds(long timeOutInMilliSeconds)
          This is used in blocking scenario.
 void setTo(EndpointReference to)
           
 void setTransportInfo(java.lang.String senderTransport, java.lang.String listenerTransport, boolean useSeperateListener)
          Deprecated. Use setListenerTransportProtocol(String) and useSeparateListener(boolean) instead. You do not need to setSenderTransportProtocol(String) as sender transport can be inferred from the to EPR. But still you can setSenderTransport(TransportOutDescription).
 void setUseSeparateListener(boolean useSeparateListener)
          Used to specify whether the two SOAP Messages are be sent over same channel or over separate channels.The value of this variable depends on the transport specified.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

senderTransport

protected TransportOutDescription senderTransport
This is used for sending and receiving messages.


COPY_PROPERTIES

public static final java.lang.String COPY_PROPERTIES
See Also:
Constant Field Values
Constructor Detail

Options

public Options()
Method Detail

setProperty

public void setProperty(java.lang.String propertyKey,
                        java.lang.Object property)
Properties you need to pass in to the message context must be set via this. If there is a method to the set this property, within this class, its encouraged to use that method, without duplicating stuff or making room for bugs.

Parameters:
propertyKey -
property -

getProperty

public java.lang.Object getProperty(java.lang.String key)
Parameters:
key -
Returns:
the value realeted to this key. Null, if not found.

getProperties

public java.util.Map getProperties()

setProperties

public void setProperties(java.util.Map properties)
This will set the properties to the context. But in setting that one may need to "copy" all the properties from the source properties to the target properties. To enable this we introduced a property (org.apache.axis2.client.Options#COPY_PROPERTIES) so that if set to Boolean(true), this code will copy the whole thing, without just referencing to the source.

Parameters:
properties -

getSoapVersionURI

public java.lang.String getSoapVersionURI()

setSoapVersionURI

public void setSoapVersionURI(java.lang.String soapVersionURI)

getSoapAction

public java.lang.String getSoapAction()

setSoapAction

public void setSoapAction(java.lang.String soapAction)

isExceptionToBeThrownOnSOAPFault

public boolean isExceptionToBeThrownOnSOAPFault()
If there is a SOAP Fault in the body of the incoming SOAP Message, system can be configured to throw an exception with the details extracted from the information from the fault message. This boolean variable will enable that facility. If this is false, the response message will just be returned to the application, irrespective of whether it has a Fault or not.


setExceptionToBeThrownOnSOAPFault

public void setExceptionToBeThrownOnSOAPFault(boolean exceptionToBeThrownOnSOAPFault)
If there is a SOAP Fault in the body of the incoming SOAP Message, system can be configured to throw an exception with the details extracted from the information from the fault message. This boolean variable will enable that facility. If this is false, the response message will just be returned to the application, irrespective of whether it has a Fault or not.

Parameters:
exceptionToBeThrownOnSOAPFault -

getTimeOutInMilliSeconds

public long getTimeOutInMilliSeconds()
Gets the wait time after which a client times out in a blocking scenario. The default is 2000.

Returns:
timeOutInMilliSeconds

setTimeOutInMilliSeconds

public void setTimeOutInMilliSeconds(long timeOutInMilliSeconds)
This is used in blocking scenario. Client will time out after waiting this amount of time. The default is 2000 and must be provided in multiples of 100.

Parameters:
timeOutInMilliSeconds -

getListener

public TransportListener getListener()

setListener

public void setListener(TransportListener listener)

getSenderTransport

public TransportOutDescription getSenderTransport()

setSenderTransport

public void setSenderTransport(TransportOutDescription senderTransport)

setSenderTransport

public void setSenderTransport(java.lang.String senderTransport,
                               AxisConfiguration axisConfiguration)
                        throws AxisFault
Sets the transport to be used for sending the SOAP Message

Parameters:
senderTransport -
Throws:
AxisFault - if the transport is not found

getListenerTransport

public TransportInDescription getListenerTransport()

setListenerTransport

public void setListenerTransport(TransportInDescription listenerTransport)

isUseSeparateListener

public boolean isUseSeparateListener()

setUseSeparateListener

public void setUseSeparateListener(boolean useSeparateListener)
Used to specify whether the two SOAP Messages are be sent over same channel or over separate channels.The value of this variable depends on the transport specified. For e.g., if the transports are different this is true by default. HTTP transport supports both cases while SMTP transport supports only two channel case.

Parameters:
useSeparateListener -

getAction

public java.lang.String getAction()

setAction

public void setAction(java.lang.String action)

getMessageId

public java.lang.String getMessageId()

setMessageId

public void setMessageId(java.lang.String messageId)

getTo

public EndpointReference getTo()

setTo

public void setTo(EndpointReference to)

getFrom

public EndpointReference getFrom()

setFrom

public void setFrom(EndpointReference from)

getReplyTo

public EndpointReference getReplyTo()

setReplyTo

public void setReplyTo(EndpointReference replyTo)

getFaultTo

public EndpointReference getFaultTo()

setFaultTo

public void setFaultTo(EndpointReference faultTo)

getRelatesTo

public RelatesTo getRelatesTo()

setRelatesTo

public void setRelatesTo(RelatesTo relatesTo)

getListenerTransportProtocol

public java.lang.String getListenerTransportProtocol()

setListenerTransportProtocol

public void setListenerTransportProtocol(java.lang.String listenerTransportProtocol)

getSenderTrasportProtocol

public java.lang.String getSenderTrasportProtocol()

setTransportInfo

public void setTransportInfo(java.lang.String senderTransport,
                             java.lang.String listenerTransport,
                             boolean useSeperateListener)
                      throws AxisFault
Deprecated. Use setListenerTransportProtocol(String) and useSeparateListener(boolean) instead. You do not need to setSenderTransportProtocol(String) as sender transport can be inferred from the to EPR. But still you can setSenderTransport(TransportOutDescription).

Sets transport information to the call. The senarios supported are as follows:
 [senderTransport, listenerTransport, useSeparateListener]
 http, http, true
 http, http, false
 http,smtp,true
 smtp,http,true
 smtp,smtp,true
 

Parameters:
senderTransport -
listenerTransport -
useSeperateListener -
Throws:
AxisFault