cgl.narada.wsinfra.wsr.impl
Class WsrSinkNodeHelper

java.lang.Object
  extended bycgl.narada.wsinfra.WsProcessor
      extended bycgl.narada.wsinfra.wsr.impl.WsrSinkNodeHelper

public class WsrSinkNodeHelper
extends WsProcessor


Constructor Summary
WsrSinkNodeHelper()
          Creates a new instance of WsrSinkNodeHelper
 
Method Summary
 void checkExchangeType(WsrExchangeInfo wsrExchangeInfo, int direction)
          Checks an exchange type for validity.
 void checkForProblemsInPollRequestDocument(PollRequestDocument pollRequestDocument, AddressingHeaders addressingHeaders)
          check for problems in PollRequest Document
 boolean checkForProblemsInRequestDocument(RequestDocument requestDocument, AddressingHeaders addressingHeaders)
          This method checks the probles in Request Document
 WsrGroupInfoImpl createGroupInfoFromRequestDocument(RequestDocument requestDocument, AddressingHeaders addressingHeaders)
          create GroupInfo from Request Document
 long[] createLongArrayFromVector(Vector vector)
          create Long Number array from Vector
 WsrStorageWidgetImpl createMessageInfoFromRequestDocument(RequestDocument requestDocument)
          Create MessageInfo from Requestdocument
 EnvelopeDocument createResponse(AddressingHeaders addressingHeaders, RequestDocument requestDocument, ResponseDocument responseDocument)
          This method will create response based on reply pattern.
static WsrSinkNodeHelper getInstance()
           
 WsMessageFlow getMessageFlow()
          Gets the message flow which the processor should use.
 EnvelopeDocument getSoapEnvelope(AddressingHeaders addressingHeaders, String replyTo)
           
 void initialize(WsrStorageService wsrStorageService)
           
 boolean processExchange(EnvelopeDocument envelopeDocument, int direction)
          This is the method which all implementations of the various WS specifications will override.
 void setEndpointReference(EndpointReferenceType endpointReference)
           
 void setMessageFlow(WsMessageFlow wsMessageFlow)
          Sets the message flow which the processor should use
 void throwInvalidMessageFaultException(String reason, AddressingHeaders addressingHeaders)
          Throws an Invalid MessageFault exception based on the specified parameters
 void updateGroupTerminationInfo(WsrGroupTerminationInfoImpl wsrGroupTerminationInfo, Calendar groupExpiryTime, GDuration groupMaxIdleDuration, Calendar messageExpiryTime)
          update groupTerminationInfo object according to specified parameters
 
Methods inherited from class cgl.narada.wsinfra.WsProcessor
enrouteToApplication, enrouteToNetwork, isFault, manageFaultException, processExchange, processExchange
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WsrSinkNodeHelper

public WsrSinkNodeHelper()
Creates a new instance of WsrSinkNodeHelper

Method Detail

getInstance

public static WsrSinkNodeHelper getInstance()

initialize

public void initialize(WsrStorageService wsrStorageService)
                throws DeploymentException
Throws:
DeploymentException

processExchange

public boolean processExchange(EnvelopeDocument envelopeDocument,
                               int direction)
                        throws UnknownExchangeException,
                               IncorrectExchangeException,
                               ProcessingException,
                               MessageFlowException
Description copied from class: WsProcessor
This is the method which all implementations of the various WS specifications will override. Note that deployement need only pass the JAVA-WORLD javax.xml.SOAPMessage and all the processing and conversions take place automatically.

Specified by:
processExchange in class WsProcessor
Throws:
UnknownExchangeException
IncorrectExchangeException
ProcessingException
MessageFlowException

setMessageFlow

public void setMessageFlow(WsMessageFlow wsMessageFlow)
                    throws DeploymentException
Sets the message flow which the processor should use

Specified by:
setMessageFlow in class WsProcessor
Throws:
DeploymentException

getMessageFlow

public WsMessageFlow getMessageFlow()
Gets the message flow which the processor should use.

Specified by:
getMessageFlow in class WsProcessor

setEndpointReference

public void setEndpointReference(EndpointReferenceType endpointReference)

checkForProblemsInRequestDocument

public boolean checkForProblemsInRequestDocument(RequestDocument requestDocument,
                                                 AddressingHeaders addressingHeaders)
                                          throws WsFaultException,
                                                 WsrStorageException,
                                                 MessageFlowException
This method checks the probles in Request Document

Throws:
WsFaultException
WsrStorageException
MessageFlowException

createResponse

public EnvelopeDocument createResponse(AddressingHeaders addressingHeaders,
                                       RequestDocument requestDocument,
                                       ResponseDocument responseDocument)
This method will create response based on reply pattern.


getSoapEnvelope

public EnvelopeDocument getSoapEnvelope(AddressingHeaders addressingHeaders,
                                        String replyTo)

createGroupInfoFromRequestDocument

public WsrGroupInfoImpl createGroupInfoFromRequestDocument(RequestDocument requestDocument,
                                                           AddressingHeaders addressingHeaders)
create GroupInfo from Request Document


createMessageInfoFromRequestDocument

public WsrStorageWidgetImpl createMessageInfoFromRequestDocument(RequestDocument requestDocument)
Create MessageInfo from Requestdocument


updateGroupTerminationInfo

public void updateGroupTerminationInfo(WsrGroupTerminationInfoImpl wsrGroupTerminationInfo,
                                       Calendar groupExpiryTime,
                                       GDuration groupMaxIdleDuration,
                                       Calendar messageExpiryTime)
update groupTerminationInfo object according to specified parameters


checkExchangeType

public void checkExchangeType(WsrExchangeInfo wsrExchangeInfo,
                              int direction)
                       throws UnknownExchangeException,
                              IncorrectExchangeException
Checks an exchange type for validity. If there are problems exceptions are thrown.

Throws:
UnknownExchangeException
IncorrectExchangeException

throwInvalidMessageFaultException

public void throwInvalidMessageFaultException(String reason,
                                              AddressingHeaders addressingHeaders)
                                       throws WsFaultException
Throws an Invalid MessageFault exception based on the specified parameters

Throws:
WsFaultException

checkForProblemsInPollRequestDocument

public void checkForProblemsInPollRequestDocument(PollRequestDocument pollRequestDocument,
                                                  AddressingHeaders addressingHeaders)
                                           throws WsFaultException
check for problems in PollRequest Document

Throws:
WsFaultException

createLongArrayFromVector

public long[] createLongArrayFromVector(Vector vector)
create Long Number array from Vector