org.apache.wsif.base
Class WSIFDefaultOperation

java.lang.Object
  extended by org.apache.wsif.base.WSIFDefaultOperation
All Implemented Interfaces:
java.io.Serializable, WSIFOperation
Direct Known Subclasses:
WSIFOperation_ApacheAxis, WSIFOperation_ApacheSOAP, WSIFOperation_BSF, WSIFOperation_EJB, WSIFOperation_Java, WSIFOperation_Jms, WSIFOperation_SoapRMI

public abstract class WSIFDefaultOperation
extends java.lang.Object
implements WSIFOperation

See Also:
Serialized Form

Constructor Summary
WSIFDefaultOperation()
           
 
Method Summary
 void addInputJmsPropertyValues(java.util.List list)
          This method adds new property values to existing HashMap.
 WSIFMessage createFaultMessage()
          Create a fault message that may be received into via this port.
 WSIFMessage createFaultMessage(java.lang.String name)
          Create a fault message that may be received into via this port.
 WSIFMessage createInputMessage()
          Create an input message that will be sent via this port.
 WSIFMessage createInputMessage(java.lang.String name)
          Create an input message that will be sent via this port.
 WSIFMessage createOutputMessage()
          Create an output message that will be received into via this port.
 WSIFMessage createOutputMessage(java.lang.String name)
          Create an output message that will be received into via this port.
abstract  void executeInputOnlyOperation(WSIFMessage input)
          Execute an input-only operation.
 WSIFCorrelationId executeRequestResponseAsync(WSIFMessage input)
          Default implementation of executeRequestResponseAsync.
 WSIFCorrelationId executeRequestResponseAsync(WSIFMessage input, WSIFResponseHandler handler)
          Default implementation of executeRequestResponseAsync.
abstract  boolean executeRequestResponseOperation(WSIFMessage input, WSIFMessage output, WSIFMessage fault)
          Execute a request-response operation.
 void fireAsyncResponse(java.lang.Object response)
          Default implemantation of fireAsyncResponse.
 WSIFMessage getContext()
          Gets the context information for this binding.
 java.util.HashMap getInputJmsProperties()
           
 java.util.HashMap getInputJmsPropertyValues()
           
 java.util.HashMap getOutputJmsProperties()
           
abstract  WSIFPort getWSIFPort()
           
 boolean processAsyncResponse(java.lang.Object response, WSIFMessage output, WSIFMessage fault)
          Default implemantation of processAsyncResponse.
 void setContext(WSIFMessage context)
          Allows the application programmer or stub to pass context information to the binding.
 void setInputJmsProperties(java.util.HashMap hm)
           
 void setInputJmsProperties(java.util.List list)
          Sets the input Jms properties for this operation
 void setInputJmsPropertyValues(java.util.HashMap hm)
           
 void setOutputJmsProperties(java.util.HashMap hm)
           
 void setOutputJmsProperties(java.util.List list)
          Sets the output Jms properties for this operation
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WSIFDefaultOperation

public WSIFDefaultOperation()
Method Detail

executeRequestResponseOperation

public abstract boolean executeRequestResponseOperation(WSIFMessage input,
                                                        WSIFMessage output,
                                                        WSIFMessage fault)
                                                 throws WSIFException
Description copied from interface: WSIFOperation
Execute a request-response operation. The signature allows for input, output and fault messages. WSDL in fact allows one to describe the set of possible faults an operation may result in, however, only one fault can occur at any one time.

Specified by:
executeRequestResponseOperation in interface WSIFOperation
Parameters:
input - input message to send to the operation
output - an empty message which will be filled in if the operation invocation succeeds. If it does not succeed, the contents of this message are undefined. (This is a return value of this method.)
fault - an empty message which will be filled in if the operation invocation fails. If it succeeds, the contents of this message are undefined. (This is a return value of this method.)
Returns:
true or false indicating whether a fault message was generated or not. The truth value indicates whether the output or fault message has useful information.
Throws:
WSIFException - if something goes wrong.
See Also:
WSIFOperation.executeRequestResponseOperation(WSIFMessage, WSIFMessage, WSIFMessage)

executeInputOnlyOperation

public abstract void executeInputOnlyOperation(WSIFMessage input)
                                        throws WSIFException
Description copied from interface: WSIFOperation
Execute an input-only operation.

Specified by:
executeInputOnlyOperation in interface WSIFOperation
Parameters:
input - input message to send to the operation
Throws:
WSIFException - if something goes wrong.
See Also:
WSIFOperation.executeInputOnlyOperation(WSIFMessage)

executeRequestResponseAsync

public WSIFCorrelationId executeRequestResponseAsync(WSIFMessage input,
                                                     WSIFResponseHandler handler)
                                              throws WSIFException
Default implementation of executeRequestResponseAsync. By default async operation is not supported so this just throws an exception.

Specified by:
executeRequestResponseAsync in interface WSIFOperation
Parameters:
input - input message to send to the operation
handler - the response handler that will be notified when the asynchronous response becomes available.
Returns:
the correlation ID or the request. The correlation ID is used to associate the request with the WSIFOperation.
Throws:
WSIFException - if something goes wrong.
See Also:
WSIFOperation.executeRequestResponseAsync(WSIFMessage, WSIFResponseHandler)

executeRequestResponseAsync

public WSIFCorrelationId executeRequestResponseAsync(WSIFMessage input)
                                              throws WSIFException
Default implementation of executeRequestResponseAsync. By default async operation is not supported so this just throws an exception.

Specified by:
executeRequestResponseAsync in interface WSIFOperation
Parameters:
input - input message to send to the operation
Returns:
the correlation ID or the request. The correlation ID is used to associate the request with the WSIFOperation.
Throws:
WSIFException - if something goes wrong.
See Also:
WSIFOperation.executeRequestResponseAsync(WSIFMessage)

fireAsyncResponse

public void fireAsyncResponse(java.lang.Object response)
                       throws WSIFException
Default implemantation of fireAsyncResponse. By default async operation is not supported so this just throws an exception.

Specified by:
fireAsyncResponse in interface WSIFOperation
Parameters:
response - an Object representing the response
Throws:
WSIFException - if something goes wrong
See Also:
WSIFOperation.fireAsyncResponse(Object)

processAsyncResponse

public boolean processAsyncResponse(java.lang.Object response,
                                    WSIFMessage output,
                                    WSIFMessage fault)
                             throws WSIFException
Default implemantation of processAsyncResponse. By default async operation is not supported so this just throws an exception.

Specified by:
processAsyncResponse in interface WSIFOperation
Parameters:
response - an Object representing the response.
output - an empty message which will be filled in if the operation invocation succeeds. If it does not succeed, the contents of this message are undefined. (This is a return value of this method.)
fault - an empty message which will be filled in if the operation invocation fails. If it succeeds, the contents of this message are undefined. (This is a return value of this method.)
Returns:
true or false indicating whether a fault message was generated or not. The truth value indicates whether the output or fault message has useful information.
Throws:
WSIFException - if something goes wrong
See Also:
WSIFOperation.processAsyncResponse(Object,WSIFMessage,WSIFMessage)

createInputMessage

public WSIFMessage createInputMessage()
Description copied from interface: WSIFOperation
Create an input message that will be sent via this port. It is responsibility of caller to set message name.

Specified by:
createInputMessage in interface WSIFOperation
Returns:
a new message
See Also:
WSIFOperation.createInputMessage()

createInputMessage

public WSIFMessage createInputMessage(java.lang.String name)
Description copied from interface: WSIFOperation
Create an input message that will be sent via this port.

Specified by:
createInputMessage in interface WSIFOperation
Parameters:
name - for the new message
Returns:
a new message
See Also:
WSIFOperation.createInputMessage(String)

createOutputMessage

public WSIFMessage createOutputMessage()
Description copied from interface: WSIFOperation
Create an output message that will be received into via this port. It is responsibility of caller to set message name.

Specified by:
createOutputMessage in interface WSIFOperation
Returns:
a new message
See Also:
WSIFOperation.createOutputMessage()

createOutputMessage

public WSIFMessage createOutputMessage(java.lang.String name)
Description copied from interface: WSIFOperation
Create an output message that will be received into via this port.

Specified by:
createOutputMessage in interface WSIFOperation
Parameters:
name - for the new message
Returns:
a new message
See Also:
WSIFOperation.createOutputMessage(String)

createFaultMessage

public WSIFMessage createFaultMessage()
Description copied from interface: WSIFOperation
Create a fault message that may be received into via this port. It is responsibility of caller to set message name.

Specified by:
createFaultMessage in interface WSIFOperation
Returns:
a new message
See Also:
WSIFOperation.createFaultMessage()

createFaultMessage

public WSIFMessage createFaultMessage(java.lang.String name)
Description copied from interface: WSIFOperation
Create a fault message that may be received into via this port.

Specified by:
createFaultMessage in interface WSIFOperation
Parameters:
name - for the new message
Returns:
a new message
See Also:
WSIFOperation.createFaultMessage(String)

setInputJmsProperties

public void setInputJmsProperties(java.util.List list)
                           throws WSIFException
Sets the input Jms properties for this operation

Throws:
WSIFException

setOutputJmsProperties

public void setOutputJmsProperties(java.util.List list)
                            throws WSIFException
Sets the output Jms properties for this operation

Throws:
WSIFException

setInputJmsProperties

public void setInputJmsProperties(java.util.HashMap hm)

setOutputJmsProperties

public void setOutputJmsProperties(java.util.HashMap hm)

getInputJmsProperties

public java.util.HashMap getInputJmsProperties()

getOutputJmsProperties

public java.util.HashMap getOutputJmsProperties()

getWSIFPort

public abstract WSIFPort getWSIFPort()

addInputJmsPropertyValues

public void addInputJmsPropertyValues(java.util.List list)
                               throws WSIFException
This method adds new property values to existing HashMap. Where a property value exists in the existing HashMap and the new list, this method replaces the existing property value with the new one from the list.

Throws:
WSIFException

setInputJmsPropertyValues

public void setInputJmsPropertyValues(java.util.HashMap hm)

getInputJmsPropertyValues

public java.util.HashMap getInputJmsPropertyValues()

setContext

public void setContext(WSIFMessage context)
Allows the application programmer or stub to pass context information to the binding. The Port implementation may use this context - for example to update a SOAP header. There is no definition of how a Port may utilize the context.

Specified by:
setContext in interface WSIFOperation
Parameters:
context - context information

getContext

public WSIFMessage getContext()
                       throws WSIFException
Gets the context information for this binding.

Specified by:
getContext in interface WSIFOperation
Returns:
context
Throws:
WSIFException


Copyright ? 2002, 2006 Apache XML Project. All Rights Reserved.