cgl.narada.wsinfra.deployment
Interface FilterPipeline

All Known Implementing Classes:
FilterPipelineImpl

public interface FilterPipeline

This interface outlines functionality within the FilterPipeline. Specifically, filters can be dynamically added, removed, substituted and reorganized within the filter pipeline. Furthermore, individual filters can configure themselves to be part of the input OR the output flow within the FilterPipeline.


Method Summary
 void addFilter(Filter filter)
          Add a filter to this filter pipeline.
 void addFilterAt(Filter filter, int position)
          Add a filter to this filter pipeline at a specific position.
 void executeInputFilters(SOAPContext soapContext)
          This method executes ALL the filters within the input part of the filter pipeline.
 void executeOutputFilters(SOAPContext soapContext)
          Executes ALL the output filters within the Filter pipeline.
 Filter[] getFilters()
          Retrive an enumeration of the filters that are part of the filter pipeline.
 String getIdentifier()
          Retrieve the identifier of the filter pipeline.
 int getNumberOfInputFilters()
          Gets the total number of input filters.
 int getNumberOfOutputFilters()
          Gets the total number of output filters.
 int getPositionInFilterPipeline(Filter filter)
          Retrieves the position of the filter within the filter pipeline, irrespective of whether it is an input filter or output filter or both.
 int getPositionInFilterPipeline(Filter filter, boolean input)
          Gets the position of a given filter within the FilterPipeline.
 int getTotalNumberOfFilters()
          Gets the num of filters that comprise the filter pipeline.
 void injectMessageTowardsApplication(SOAPMessage soapMessage, Filter filter)
          Injects a message based on the filter's position within the filter pipeline towards the application.
 void injectMessageTowardsApplication(SOAPMessage soapMessage, int position)
          Injects a message at a specific location within the filter pipeline towards the application.
 void injectMessageTowardsNetwork(SOAPMessage soapMessage, Filter filter)
          Injects a message at the filter immediately following this filter in the path TOWARDS the NETWORK.
 void injectMessageTowardsNetwork(SOAPMessage soapMessage, int position)
          Injects a message at a specific location within the filter pipeline.
 boolean isPartOfPipeline(Filter filter)
          Checks to see if a given filter is part of this pipeline.
 void moveFilter(Filter filter, int position)
          This method moves a filter within a filter chain to the specified position.
 void processMessageFromApplication(SOAPMessage soapMessage)
          Process a message received from the application.
 void processMessageFromNetwork(SOAPMessage soapMessage)
          Process a message received over the network.
 void registerNetworkSubstrate(NetworkSubstrate networkSubstrate)
          Register a networking substrate for this filter pipeline.
 void registerServiceMessageListener(ServiceMessageListener serviceMessageListener)
          Register the service message listener for this filter pipeline.
 void removeFilter(Filter filter)
          Remove a filter from this filter-pipeline.
 void removeFilterAt(int position)
          Remove a filter at the specified location.
 void replaceFilter(Filter filter, int position)
          This method replaces the existing filter at a given position with the specified one.
 void setIdentifier(String identifier)
          Set the identifier of the filter pipeline.
 

Method Detail

registerServiceMessageListener

void registerServiceMessageListener(ServiceMessageListener serviceMessageListener)
                                    throws DeploymentException
Register the service message listener for this filter pipeline.

Throws:
DeploymentException

registerNetworkSubstrate

void registerNetworkSubstrate(NetworkSubstrate networkSubstrate)
                              throws DeploymentException
Register a networking substrate for this filter pipeline.

Throws:
DeploymentException

isPartOfPipeline

boolean isPartOfPipeline(Filter filter)
Checks to see if a given filter is part of this pipeline.


addFilter

void addFilter(Filter filter)
               throws DeploymentException
Add a filter to this filter pipeline.

Throws:
DeploymentException

addFilterAt

void addFilterAt(Filter filter,
                 int position)
                 throws DeploymentException
Add a filter to this filter pipeline at a specific position.

Throws:
DeploymentException

removeFilter

void removeFilter(Filter filter)
                  throws DeploymentException
Remove a filter from this filter-pipeline.

Throws:
DeploymentException

removeFilterAt

void removeFilterAt(int position)
                    throws DeploymentException
Remove a filter at the specified location.

Throws:
DeploymentException

moveFilter

void moveFilter(Filter filter,
                int position)
                throws DeploymentException
This method moves a filter within a filter chain to the specified position. The positions of all the other filters within the filter pipeline are adjusted accordingly. For e.g. F1 --- F2 --- F3 --- F4 --- F5, if you move F3 to the 5th position the filter chain would now look like F1 --- F2 --- F4 --- F5 --- F3. This method throws an exception if the filter does not belong to this filter pipeline OR if the position is not a valid one. The position number CANNOT exceed the number of filters within the filter chain. Also, filter numbering begins at 0.

Throws:
DeploymentException

replaceFilter

void replaceFilter(Filter filter,
                   int position)
                   throws DeploymentException
This method replaces the existing filter at a given position with the specified one.

Throws:
DeploymentException

executeInputFilters

void executeInputFilters(SOAPContext soapContext)
This method executes ALL the filters within the input part of the filter pipeline. This method is typically used for SOAP messages that are received over the network.


executeOutputFilters

void executeOutputFilters(SOAPContext soapContext)
                          throws DeploymentException,
                                 MessageFlowException,
                                 ProcessingException
Executes ALL the output filters within the Filter pipeline. This method is typically called for SOAP messages received from the application.

Throws:
DeploymentException
MessageFlowException
ProcessingException

processMessageFromNetwork

void processMessageFromNetwork(SOAPMessage soapMessage)
Process a message received over the network.


processMessageFromApplication

void processMessageFromApplication(SOAPMessage soapMessage)
                                   throws DeploymentException,
                                          MessageFlowException,
                                          ProcessingException
Process a message received from the application.

Throws:
DeploymentException
MessageFlowException
ProcessingException

injectMessageTowardsApplication

void injectMessageTowardsApplication(SOAPMessage soapMessage,
                                     Filter filter)
                                     throws DeploymentException
Injects a message based on the filter's position within the filter pipeline towards the application.

Throws:
DeploymentException

injectMessageTowardsApplication

void injectMessageTowardsApplication(SOAPMessage soapMessage,
                                     int position)
                                     throws DeploymentException
Injects a message at a specific location within the filter pipeline towards the application.

Throws:
DeploymentException

injectMessageTowardsNetwork

void injectMessageTowardsNetwork(SOAPMessage soapMessage,
                                 Filter filter)
                                 throws DeploymentException,
                                        MessageFlowException,
                                        ProcessingException
Injects a message at the filter immediately following this filter in the path TOWARDS the NETWORK.

Throws:
DeploymentException
MessageFlowException
ProcessingException

injectMessageTowardsNetwork

void injectMessageTowardsNetwork(SOAPMessage soapMessage,
                                 int position)
                                 throws DeploymentException,
                                        MessageFlowException,
                                        ProcessingException
Injects a message at a specific location within the filter pipeline.

Throws:
DeploymentException
MessageFlowException
ProcessingException

getPositionInFilterPipeline

int getPositionInFilterPipeline(Filter filter)
                                throws DeploymentException
Retrieves the position of the filter within the filter pipeline, irrespective of whether it is an input filter or output filter or both.

Throws:
DeploymentException

getPositionInFilterPipeline

int getPositionInFilterPipeline(Filter filter,
                                boolean input)
                                throws DeploymentException
Gets the position of a given filter within the FilterPipeline. The second variable returns position depending on whether it is within the input path or the output path. Specifically, this method determines how many input/output filters reside before the filter in question.

Throws:
DeploymentException

getTotalNumberOfFilters

int getTotalNumberOfFilters()
Gets the num of filters that comprise the filter pipeline.


getNumberOfInputFilters

int getNumberOfInputFilters()
Gets the total number of input filters.


getNumberOfOutputFilters

int getNumberOfOutputFilters()
Gets the total number of output filters.


getFilters

Filter[] getFilters()
Retrive an enumeration of the filters that are part of the filter pipeline.


setIdentifier

void setIdentifier(String identifier)
                   throws DeploymentException
Set the identifier of the filter pipeline.

Throws:
DeploymentException

getIdentifier

String getIdentifier()
Retrieve the identifier of the filter pipeline.



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