cgl.narada.wsinfra.wsr.impl
Class WsrSinkNode

java.lang.Object
  extended by cgl.narada.wsinfra.WsProcessor
      extended by cgl.narada.wsinfra.wsr.impl.WsrSinkNode
All Implemented Interfaces:
WsrSink

public class WsrSinkNode
extends WsProcessor
implements WsrSink

This class outlines the functionality of a WSR Sink.


Constructor Summary
WsrSinkNode(String configInfo)
          Creates a new instance of WsrSinkNode
 
Method Summary
 boolean addStatusToResponse(ResponseDocument responseDocument, String groupId, long[] seqNums)
           
 long[] createLongArrayFromVector(Vector vector)
          create Long Number array from Vector
 EnvelopeDocument createResponseEnvelope(RequestDocument requestDocument, AddressingHeaders addressingHeaders, String groupId, String fault, boolean isNonSequenceReply, long sequenceNumber)
           
 EndpointReferenceType getEndpointReference()
          get the endpoint reference associated with this node
 WsMessageFlow getMessageFlow()
          Gets the message flow which the processor should use.
 boolean processExchange(EnvelopeDocument envelopeDocument, int direction)
          Process the exchange.
 void processExistingGroup(String groupId, EnvelopeDocument envelopeDocument, AddressingHeaders addressingHeaders)
          Process existing group request
 void processMessageFromApplication(EnvelopeDocument envelopeDocument, AddressingHeaders addressingHeaders)
          Process exchange received from application, and send it across reliability
 void processNewGroup(String groupId, EnvelopeDocument envelopeDocument, AddressingHeaders addressingHeaders)
          Process New Group Request
 void processPollRequest(EnvelopeDocument envelopeDocument, AddressingHeaders addressingHeaders)
          Process a PollRequest received from the source for Acknowledgements
 void processRequest(EnvelopeDocument envelopeDocument, AddressingHeaders addressingHeaders)
          Process a simple request received from the source
 void processUndeliveredSequenceNumbers(String groupId, long sequenceNumber, AddressingHeaders addressingHeaders, RequestDocument requestDocument)
          process Undelivered Sequence Numbers
 void sendForCallback(EnvelopeDocument envelopeDocument, RequestDocument requestDocument, AddressingHeaders addressingHeaders)
           
 void setEndpointReference(EndpointReferenceType endpointReference)
          Set the endpoint reference associated with this node
 void setMessageFlow(WsMessageFlow wsMessageFlow)
          Sets the message flow which the processor should use
 
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
 

Constructor Detail

WsrSinkNode

public WsrSinkNode(String configInfo)
            throws DeploymentException
Creates a new instance of WsrSinkNode

Throws:
DeploymentException
Method Detail

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)
Set the endpoint reference associated with this node

Specified by:
setEndpointReference in interface WsrSink

getEndpointReference

public EndpointReferenceType getEndpointReference()
get the endpoint reference associated with this node

Specified by:
getEndpointReference in interface WsrSink

processExchange

public boolean processExchange(EnvelopeDocument envelopeDocument,
                               int direction)
                        throws UnknownExchangeException,
                               IncorrectExchangeException,
                               ProcessingException,
                               MessageFlowException
Process the exchange. The argument also indicates the direction in which the exchange has actually traversed.

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

processRequest

public void processRequest(EnvelopeDocument envelopeDocument,
                           AddressingHeaders addressingHeaders)
                    throws WsFaultException,
                           MessageFlowException,
                           WsrStorageException
Process a simple request received from the source

Specified by:
processRequest in interface WsrSink
Throws:
WsFaultException
MessageFlowException
WsrStorageException

processNewGroup

public void processNewGroup(String groupId,
                            EnvelopeDocument envelopeDocument,
                            AddressingHeaders addressingHeaders)
                     throws WsFaultException,
                            WsrStorageException,
                            MessageFlowException
Process New Group Request

Throws:
WsFaultException
WsrStorageException
MessageFlowException

sendForCallback

public void sendForCallback(EnvelopeDocument envelopeDocument,
                            RequestDocument requestDocument,
                            AddressingHeaders addressingHeaders)
                     throws WsFaultException,
                            MessageFlowException
Throws:
WsFaultException
MessageFlowException

processExistingGroup

public void processExistingGroup(String groupId,
                                 EnvelopeDocument envelopeDocument,
                                 AddressingHeaders addressingHeaders)
                          throws WsFaultException,
                                 WsrStorageException,
                                 MessageFlowException
Process existing group request

Throws:
WsFaultException
WsrStorageException
MessageFlowException

processUndeliveredSequenceNumbers

public void processUndeliveredSequenceNumbers(String groupId,
                                              long sequenceNumber,
                                              AddressingHeaders addressingHeaders,
                                              RequestDocument requestDocument)
                                       throws WsrStorageException,
                                              MessageFlowException,
                                              WsFaultException
process Undelivered Sequence Numbers

Throws:
WsrStorageException
MessageFlowException
WsFaultException

createResponseEnvelope

public EnvelopeDocument createResponseEnvelope(RequestDocument requestDocument,
                                               AddressingHeaders addressingHeaders,
                                               String groupId,
                                               String fault,
                                               boolean isNonSequenceReply,
                                               long sequenceNumber)
                                        throws MessageFlowException
Throws:
MessageFlowException

processMessageFromApplication

public void processMessageFromApplication(EnvelopeDocument envelopeDocument,
                                          AddressingHeaders addressingHeaders)
                                   throws WsFaultException,
                                          MessageFlowException,
                                          WsrStorageException
Process exchange received from application, and send it across reliability

Specified by:
processMessageFromApplication in interface WsrSink
Throws:
WsFaultException
MessageFlowException
WsrStorageException

processPollRequest

public void processPollRequest(EnvelopeDocument envelopeDocument,
                               AddressingHeaders addressingHeaders)
                        throws WsFaultException,
                               MessageFlowException,
                               WsrStorageException
Process a PollRequest received from the source for Acknowledgements

Specified by:
processPollRequest in interface WsrSink
Throws:
WsFaultException
MessageFlowException
WsrStorageException

addStatusToResponse

public boolean addStatusToResponse(ResponseDocument responseDocument,
                                   String groupId,
                                   long[] seqNums)
                            throws WsrStorageException
Throws:
WsrStorageException

createLongArrayFromVector

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



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