com.arjuna.mw.wst11.service
Class JaxWSHeaderContextProcessor

java.lang.Object
  extended by com.arjuna.mw.wst11.service.JaxWSHeaderContextProcessor
All Implemented Interfaces:
Handler<SOAPMessageContext>, SOAPHandler<SOAPMessageContext>
Direct Known Subclasses:
JaxWSSubordinateHeaderContextProcessor

public class JaxWSHeaderContextProcessor
extends Object
implements SOAPHandler<SOAPMessageContext>

The class is used to perform WS-Transaction context insertion and extraction for application level SOAP messages using JaxWS. This is the server side version.


Constructor Summary
JaxWSHeaderContextProcessor()
           
 
Method Summary
 void close(MessageContext messageContext)
           
 Set<QName> getHeaders()
          Gets the header blocks that can be processed by this Handler instance.
 boolean handleFault(SOAPMessageContext messageContext)
          Tidy up the Transaction/Thread association before faults are thrown back to the client.
protected  boolean handleInbound(SOAPMessageContext msgContext)
          Process the tx context header that is attached to the received message.
protected  boolean handleInboundMessage(SOAPMessage soapMessage)
          Handle the request.
protected  boolean handleInboundMessage(SOAPMessage soapMessage, boolean installSubordinateTx)
          Handle the request.
 boolean handleMessage(SOAPMessageContext msgContext)
          Process a message.
protected  boolean handleOutbound(SOAPMessageContext messageContext)
          Tidy up the Transaction/Thread association before response is returned to the client.
 void setHeaders(Set headers)
          Sets the header blocks that can be processed by this Handler instance.
protected  void suspendTransaction()
          Suspend the current transaction.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JaxWSHeaderContextProcessor

public JaxWSHeaderContextProcessor()
Method Detail

handleMessage

public boolean handleMessage(SOAPMessageContext msgContext)
Process a message. Determines if it is inbound or outbound and dispatches accordingly.

Specified by:
handleMessage in interface Handler<SOAPMessageContext>
Parameters:
msgContext -
Returns:
true

handleFault

public boolean handleFault(SOAPMessageContext messageContext)
Tidy up the Transaction/Thread association before faults are thrown back to the client.

Specified by:
handleFault in interface Handler<SOAPMessageContext>
Parameters:
messageContext -
Returns:
true

close

public void close(MessageContext messageContext)
Specified by:
close in interface Handler<SOAPMessageContext>

getHeaders

public Set<QName> getHeaders()
Gets the header blocks that can be processed by this Handler instance.

Specified by:
getHeaders in interface SOAPHandler<SOAPMessageContext>

setHeaders

public void setHeaders(Set headers)
Sets the header blocks that can be processed by this Handler instance. Note: this impl ignores this function's args as the values are hardcoded.


handleInbound

protected boolean handleInbound(SOAPMessageContext msgContext)
Process the tx context header that is attached to the received message.

Parameters:
msgContext -
Returns:
true

handleOutbound

protected boolean handleOutbound(SOAPMessageContext messageContext)
Tidy up the Transaction/Thread association before response is returned to the client.

Parameters:
messageContext - The current message context.
Returns:
true

handleInboundMessage

protected boolean handleInboundMessage(SOAPMessage soapMessage)
Handle the request.

Parameters:
soapMessage - The current message context.

handleInboundMessage

protected boolean handleInboundMessage(SOAPMessage soapMessage,
                                       boolean installSubordinateTx)
Handle the request.

Parameters:
soapMessage - The current message context.
installSubordinateTx - true if a subordinate transaction should be interposed and false if the handler should just resume the incoming transaction. currently only works for AT transactions but will eventually be extended to work for BA transactions too.

suspendTransaction

protected void suspendTransaction()
Suspend the current transaction.



Copyright © 2012. All Rights Reserved.