cgl.narada.wsinfra.wsr.impl
Class WsrSourceNode

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

public class WsrSourceNode
extends WsProcessor
implements WsrSource

This class implements the functionality of a WSR Source.


Field Summary
static int counter
           
 
Constructor Summary
WsrSourceNode(String configInfo)
           
 
Method Summary
 void createAndEnroutePollRequest(ToDocument toDocument)
          Creates PollRequestDocument from specified parameters and enroute to the network
 WsrGroupInfoImpl createGroupInfo(String groupId, EnvelopeDocument envelopeDocument)
          create GroupInfo from Property file
 WsrStorageWidgetImpl createMessageInfo(String groupId, long sequenceNumber, EnvelopeDocument envelopeDocument)
          Create MessageInfo from Property file
 EndpointReferenceType getEndpointReference()
          Retrieves 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.
 boolean processExistingGroup(String groupId, EnvelopeDocument envelopeDocument)
          process Existing Group Request
 void processMessageFromApplication(EnvelopeDocument envelopeDocument, AddressingHeaders addressingHeaders)
          Process exchange received from application, and send it across reliability
 boolean processNewGroup(String groupId, String destination, EnvelopeDocument envelopeDocument)
          Process New Group Request
 boolean processNonSequenceReply(ResponseDocument responseDocument)
          process Non Sequence Reply
 void processResponse(EnvelopeDocument envelopeDocument, AddressingHeaders addressingHeaders)
          Process group acknowledgements and faults received over the wire from the sink
 boolean processSequenceReply(ResponseDocument responseDocument)
          process Sequence Reply
 void processTermination(ResponseDocument responseDocument)
          process Sequence Termination
 void removeHeadersFromEnvelopeDocument(EnvelopeDocument envelopeDocument)
          Remove extra headers from EnvelopeDocument
 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
 

Field Detail

counter

public static int counter
Constructor Detail

WsrSourceNode

public WsrSourceNode(String configInfo)
              throws DeploymentException
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

getEndpointReference

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

Specified by:
getEndpointReference in interface WsrSource

setEndpointReference

public void setEndpointReference(EndpointReferenceType endpointReference)
Set the endpoint reference associated with this node

Specified by:
setEndpointReference in interface WsrSource

processExchange

public boolean processExchange(EnvelopeDocument envelopeDocument,
                               int direction)
                        throws UnknownExchangeException,
                               IncorrectExchangeException,
                               ProcessingException,
                               MessageFlowException
Process the exchange. The arguments also indicate the direction in which the exchange has actually traversed and the destination address

Specified by:
processExchange in interface WsrSource
Specified by:
processExchange in class WsProcessor
Throws:
UnknownExchangeException
IncorrectExchangeException
ProcessingException
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 WsrSource
Throws:
WsFaultException
MessageFlowException
WsrStorageException

removeHeadersFromEnvelopeDocument

public void removeHeadersFromEnvelopeDocument(EnvelopeDocument envelopeDocument)
Remove extra headers from EnvelopeDocument


createAndEnroutePollRequest

public void createAndEnroutePollRequest(ToDocument toDocument)
                                 throws WsrStorageException,
                                        MessageFlowException
Creates PollRequestDocument from specified parameters and enroute to the network

Throws:
WsrStorageException
MessageFlowException

processNewGroup

public boolean processNewGroup(String groupId,
                               String destination,
                               EnvelopeDocument envelopeDocument)
                        throws WsrStorageException,
                               WsFaultException
Process New Group Request

Throws:
WsrStorageException
WsFaultException

processExistingGroup

public boolean processExistingGroup(String groupId,
                                    EnvelopeDocument envelopeDocument)
                             throws WsrStorageException,
                                    WsFaultException
process Existing Group Request

Throws:
WsrStorageException
WsFaultException

createGroupInfo

public WsrGroupInfoImpl createGroupInfo(String groupId,
                                        EnvelopeDocument envelopeDocument)
                                 throws WsFaultException
create GroupInfo from Property file

Throws:
WsFaultException

createMessageInfo

public WsrStorageWidgetImpl createMessageInfo(String groupId,
                                              long sequenceNumber,
                                              EnvelopeDocument envelopeDocument)
                                       throws WsFaultException
Create MessageInfo from Property file

Throws:
WsFaultException

processResponse

public void processResponse(EnvelopeDocument envelopeDocument,
                            AddressingHeaders addressingHeaders)
                     throws WsFaultException,
                            MessageFlowException,
                            WsrStorageException
Process group acknowledgements and faults received over the wire from the sink

Specified by:
processResponse in interface WsrSource
Throws:
WsFaultException
MessageFlowException
WsrStorageException

processNonSequenceReply

public boolean processNonSequenceReply(ResponseDocument responseDocument)
                                throws WsrStorageException,
                                       MessageFlowException
process Non Sequence Reply

Throws:
WsrStorageException
MessageFlowException

processSequenceReply

public boolean processSequenceReply(ResponseDocument responseDocument)
                             throws WsrStorageException,
                                    MessageFlowException
process Sequence Reply

Throws:
WsrStorageException
MessageFlowException

processTermination

public void processTermination(ResponseDocument responseDocument)
                        throws WsrStorageException
process Sequence Termination

Throws:
WsrStorageException


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