cgl.narada.wsinfra.wse.impl
Class WseSinkProcessor

java.lang.Object
  extended by cgl.narada.wsinfra.WsProcessor
      extended by cgl.narada.wsinfra.wse.impl.WseSinkProcessor
All Implemented Interfaces:
SubscriptionExpiryListener

public class WseSinkProcessor
extends WsProcessor
implements SubscriptionExpiryListener

This class which implements the interface that encapsulates the behavior of a WS-Eventing sink node.


Method Summary
 EnvelopeDocument createGetStatus(String subscriptionIdentifier)
           
 EnvelopeDocument createRenew(String subscriptionIdentifier, Calendar renew)
           
 EnvelopeDocument createSubscribeRequest(EndpointReferenceType sourceEpr, String deliveryMode, EndpointReferenceType endTo, String filterDialect, String filterConstraint, Calendar expiresAt)
          Creates a subscribe request based on the specified parameters.
 EnvelopeDocument createUnsubscribe(String subscriptionIdentifier)
           
static WseSinkProcessor getInstance()
           
 WsMessageFlow getMessageFlow()
          Gets the message flow which the processor should use.
 SubscriptionManagement getSubscriptionManagement()
          Retrieves the subscription management
 void onSubscriptionExpiry(SubscriptionEntry expiredEntry)
          Method that is called when one of the managed subscriptions expires
 boolean processExchange(EnvelopeDocument envelopeDocument, int direction)
          Process the exchange.
 void processGetStatusResponse(EnvelopeDocument envelopeDocument, AddressingHeaders addressingHeaders)
          This method is used to process GetStatusRsponses.
 void processNotification(EnvelopeDocument envelopeDocument, AddressingHeaders addressingHeaders)
          This method is used to ensure process notifications.
 void processRenewResponse(EnvelopeDocument envelopeDocument, AddressingHeaders addressingHeaders)
          This method is used to process RenewResponses.
 void processSubscribeResponse(EnvelopeDocument envelopeDocument, AddressingHeaders addressingHeaders)
          This method is used to process SubscribeResponses.
 void processSubscriptionEnd(EnvelopeDocument envelopeDocument, AddressingHeaders addressingHeaders)
          This method is used to process RenewResponses.
 void processUnsubscribeResponse(EnvelopeDocument envelopeDocument, AddressingHeaders addressingHeaders)
          This method is used to process UnsubscribeResponses.
 void setMessageFlow(WsMessageFlow wsMessageFlow)
          Sets the message flow which the processor should use
 void setSinkEPR(EndpointReferenceType sinkEpr)
          Sets the Sink EPR
 
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

getInstance

public static WseSinkProcessor getInstance()

getSubscriptionManagement

public SubscriptionManagement getSubscriptionManagement()
Retrieves the subscription management

Returns:
SubscriptionManagement

setSinkEPR

public void setSinkEPR(EndpointReferenceType sinkEpr)
Sets the Sink EPR


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

processExchange

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

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

createSubscribeRequest

public EnvelopeDocument createSubscribeRequest(EndpointReferenceType sourceEpr,
                                               String deliveryMode,
                                               EndpointReferenceType endTo,
                                               String filterDialect,
                                               String filterConstraint,
                                               Calendar expiresAt)
                                        throws ProcessingException
Creates a subscribe request based on the specified parameters.

Throws:
ProcessingException

createGetStatus

public EnvelopeDocument createGetStatus(String subscriptionIdentifier)
                                 throws ProcessingException
Throws:
ProcessingException

createRenew

public EnvelopeDocument createRenew(String subscriptionIdentifier,
                                    Calendar renew)
                             throws ProcessingException
Throws:
ProcessingException

createUnsubscribe

public EnvelopeDocument createUnsubscribe(String subscriptionIdentifier)
                                   throws ProcessingException
Throws:
ProcessingException

processNotification

public void processNotification(EnvelopeDocument envelopeDocument,
                                AddressingHeaders addressingHeaders)
                         throws ProcessingException
This method is used to ensure process notifications.

Throws:
ProcessingException

processSubscribeResponse

public void processSubscribeResponse(EnvelopeDocument envelopeDocument,
                                     AddressingHeaders addressingHeaders)
                              throws WsFaultException,
                                     ProcessingException
This method is used to process SubscribeResponses.

Throws:
WsFaultException
ProcessingException

processRenewResponse

public void processRenewResponse(EnvelopeDocument envelopeDocument,
                                 AddressingHeaders addressingHeaders)
                          throws WsFaultException,
                                 ProcessingException
This method is used to process RenewResponses.

Throws:
WsFaultException
ProcessingException

processGetStatusResponse

public void processGetStatusResponse(EnvelopeDocument envelopeDocument,
                                     AddressingHeaders addressingHeaders)
                              throws WsFaultException,
                                     ProcessingException
This method is used to process GetStatusRsponses.

Throws:
WsFaultException
ProcessingException

processUnsubscribeResponse

public void processUnsubscribeResponse(EnvelopeDocument envelopeDocument,
                                       AddressingHeaders addressingHeaders)
                                throws WsFaultException
This method is used to process UnsubscribeResponses.

Throws:
WsFaultException

processSubscriptionEnd

public void processSubscriptionEnd(EnvelopeDocument envelopeDocument,
                                   AddressingHeaders addressingHeaders)
                            throws WsFaultException,
                                   ProcessingException
This method is used to process RenewResponses.

Throws:
WsFaultException
ProcessingException

onSubscriptionExpiry

public void onSubscriptionExpiry(SubscriptionEntry expiredEntry)
Method that is called when one of the managed subscriptions expires

Specified by:
onSubscriptionExpiry in interface SubscriptionExpiryListener


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