cgl.narada.wsinfra.wsr.impl
Class WsrSourceNodeHelper

java.lang.Object
  extended by cgl.narada.wsinfra.WsProcessor
      extended by cgl.narada.wsinfra.wsr.impl.WsrSourceNodeHelper

public class WsrSourceNodeHelper
extends WsProcessor


Method Summary
 void checkExchangeType(WsrExchangeInfo wsrExchangeInfo, int direction)
           
 void checkForProblemsInToDocument(AddressingHeaders addressingHeaders)
          This method enforces the rule that the [wsa:To] element should be present within a SOAP header element.
 String createGroupId()
          Generates New GroupId for Destination
 long[] createLongArrayFromVector(Vector vector)
          create Long Number array from Vector
 RequestDocument createRequest(String groupId, Calendar groupExpiryTime, GDuration groupMaxIdleDuration, long sequenceNumber, boolean isLastMessage, Calendar messageExpiryTime, String replyPattern, String replyTo)
          Create Request from specified parameters
static WsrSourceNodeHelper getInstance()
           
 WsMessageFlow getMessageFlow()
          Gets the message flow which the processor should use.
 void initialize(WsrStorageService wsrStorageService)
           
 boolean processAcknowledgements(String groupId, long[] acks)
          process Acknowledgements
 boolean processExchange(EnvelopeDocument envelopeDocument, int direction)
          This is the method which all implementations of the various WS specifications will override.
 boolean processFault(String groupId, long sequenceNumber, QName fault)
          Process Faults other than messageProcessingFailure fault
 void processMessageProcessingFailureFault(String groupId, long[] seqNum)
          process Message Processing Failure Fault
 void processNonSequenceReplyAcknowledgement(Vector nonSequenceReplyAcknowledgementVector)
          process the group acknowledgements with single message (Process Non Sequence Reply Acknowledgements
 void processNonSequenceReplyFault(Hashtable nonSequenceReplyFault)
          process Non sequence Reply Faults other than Message Processing Failure Fault
 void processNonSequenceReplyMessageProcessingFailureFault(Vector retransmissionVector)
          process Non Sequence Reply Message Processing Failure Fault (It is nothing but it will retransmit the message for the given group
 void processSequenceReplyAcknowledgement(Hashtable table)
          process the Sequence Reply Acknowledgements
 void processSequenceReplyFault(Hashtable sequenceReplyFault)
          process sequence Reply Faults other than Message Processing Failure Fault
 void processSequenceReplyMessageProcessingFailureFault(Hashtable retransmissionTable)
          process Sequence Reply Message Processing Failure Fault (It is nothing but it will retransmit the messages for the given group
 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 throwUnknownGroupFaultException(AddressingHeaders addressingHeaders, String groupId)
          Throws an UnknownGroup Fault exception based on the specified parameters
 
Methods inherited from class cgl.narada.wsinfra.WsProcessor
enrouteToApplication, enrouteToNetwork, enrouteToNetwork, isFault, manageFaultException, processExchange, processExchange
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

initialize

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

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

getInstance

public static WsrSourceNodeHelper getInstance()

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

setEndpointReference

public void setEndpointReference(EndpointReferenceType endpointReference)

checkExchangeType

public void checkExchangeType(WsrExchangeInfo wsrExchangeInfo,
                              int direction)
                       throws UnknownExchangeException,
                              IncorrectExchangeException
Throws:
UnknownExchangeException
IncorrectExchangeException

checkForProblemsInToDocument

public void checkForProblemsInToDocument(AddressingHeaders addressingHeaders)
                                  throws WsFaultException
This method enforces the rule that the [wsa:To] element should be present within a SOAP header element. If this is not present an exception needs to be thrown.

Throws:
WsFaultException

throwInvalidMessageFaultException

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

Throws:
WsFaultException

createGroupId

public String createGroupId()
Generates New GroupId for Destination


createRequest

public RequestDocument createRequest(String groupId,
                                     Calendar groupExpiryTime,
                                     GDuration groupMaxIdleDuration,
                                     long sequenceNumber,
                                     boolean isLastMessage,
                                     Calendar messageExpiryTime,
                                     String replyPattern,
                                     String replyTo)
Create Request from specified parameters


processNonSequenceReplyAcknowledgement

public void processNonSequenceReplyAcknowledgement(Vector nonSequenceReplyAcknowledgementVector)
                                            throws WsrStorageException
process the group acknowledgements with single message (Process Non Sequence Reply Acknowledgements

Throws:
WsrStorageException

processSequenceReplyAcknowledgement

public void processSequenceReplyAcknowledgement(Hashtable table)
                                         throws WsrStorageException
process the Sequence Reply Acknowledgements

Throws:
WsrStorageException

processAcknowledgements

public boolean processAcknowledgements(String groupId,
                                       long[] acks)
                                throws WsrStorageException
process Acknowledgements

Throws:
WsrStorageException

processNonSequenceReplyMessageProcessingFailureFault

public void processNonSequenceReplyMessageProcessingFailureFault(Vector retransmissionVector)
                                                          throws WsrStorageException,
                                                                 MessageFlowException
process Non Sequence Reply Message Processing Failure Fault (It is nothing but it will retransmit the message for the given group

Throws:
WsrStorageException
MessageFlowException

processSequenceReplyMessageProcessingFailureFault

public void processSequenceReplyMessageProcessingFailureFault(Hashtable retransmissionTable)
                                                       throws WsrStorageException,
                                                              MessageFlowException
process Sequence Reply Message Processing Failure Fault (It is nothing but it will retransmit the messages for the given group

Throws:
WsrStorageException
MessageFlowException

processMessageProcessingFailureFault

public void processMessageProcessingFailureFault(String groupId,
                                                 long[] seqNum)
                                          throws WsrStorageException,
                                                 MessageFlowException
process Message Processing Failure Fault

Throws:
WsrStorageException
MessageFlowException

processNonSequenceReplyFault

public void processNonSequenceReplyFault(Hashtable nonSequenceReplyFault)
                                  throws WsrStorageException
process Non sequence Reply Faults other than Message Processing Failure Fault

Throws:
WsrStorageException

processSequenceReplyFault

public void processSequenceReplyFault(Hashtable sequenceReplyFault)
                               throws WsrStorageException
process sequence Reply Faults other than Message Processing Failure Fault

Throws:
WsrStorageException

processFault

public boolean processFault(String groupId,
                            long sequenceNumber,
                            QName fault)
                     throws WsrStorageException
Process Faults other than messageProcessingFailure fault

Throws:
WsrStorageException

createLongArrayFromVector

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


throwUnknownGroupFaultException

public void throwUnknownGroupFaultException(AddressingHeaders addressingHeaders,
                                            String groupId)
                                     throws WsFaultException
Throws an UnknownGroup Fault exception based on the specified parameters

Throws:
WsFaultException


For comments and suggestions please send e-mail to The NaradaBrokering Project