com.ibm.wsgw.beans
Interface Filter

All Known Subinterfaces:
FilterRemote
All Known Implementing Classes:
FilterImpl

public interface Filter

The Filter interface allows beans to be plugged in to the Gateway to be called during processing of request and responses.

This interface is intended to be implemented by stateless session beans for each different Filter implementation.

Version:
1.7
Author:
 
See Also:

Field Summary
static int CONTEXT_VERSION_WORKAREA
          Indicate that the filter implementation uses workarea for context.
static int CONTEXT_VERSION_WSIF_MESSAGE
          Indicate that the filter implementation uses WSIF message for context.
static java.lang.String copyright
          Copyright string.
 
Method Summary
 void destroy(java.lang.String filterName)
          Notifies the filter that it has been removed from the WebServices Gateway.
 FilterAction filterRequest(org.apache.wsif.WSIFRequest request, org.apache.wsif.WSIFResponse response)
          Called when an incoming request is being processed, before the request is passed to the target service.
 FilterAction filterResponse(org.apache.wsif.WSIFRequest request, org.apache.wsif.WSIFResponse response)
          Called when an outgoing response is being processed, before the response is passed to the originator of the request.
 int getContextVersion()
          This method returns an int to indicate the method that this filter uses to access context information.
 java.lang.String getVersionString()
          This method returns a string form of the version of the filter implementation.
 void init(java.lang.String filterName)
          Notifies the filter that it has been configured for the WebServices Gateway.
 

Field Detail

copyright

public static final java.lang.String copyright
Copyright string. Any code placed between the comments will be over written

CONTEXT_VERSION_WORKAREA

public static final int CONTEXT_VERSION_WORKAREA
Indicate that the filter implementation uses workarea for context.

CONTEXT_VERSION_WSIF_MESSAGE

public static final int CONTEXT_VERSION_WSIF_MESSAGE
Indicate that the filter implementation uses WSIF message for context.
Method Detail

filterRequest

public FilterAction filterRequest(org.apache.wsif.WSIFRequest request,
                                  org.apache.wsif.WSIFResponse response)
                           throws FilterException,
                                  WSGWException,
                                  java.rmi.RemoteException
Called when an incoming request is being processed, before the request is passed to the target service.

The return value indicates whether the request should be processed further or rejected, and whether the request or response should be updated. A return value of null indicates no update to request/response and continue processing.

Parameters:
request - The request object.
response - The response object.
Returns:
The action to be taken as a result of this filter.
Throws:
FilterException - A filter-specific exception occurred.
WSGWException - An error occurred.
java.rmi.RemoteException - Required for EJB remote interfaces.
See Also:

filterResponse

public FilterAction filterResponse(org.apache.wsif.WSIFRequest request,
                                   org.apache.wsif.WSIFResponse response)
                            throws FilterException,
                                   WSGWException,
                                   java.rmi.RemoteException
Called when an outgoing response is being processed, before the response is passed to the originator of the request.

The return value indicates whether the response should be processed further or rejected, and whether the request or response should be updated. A return value of null indicates no update to request/response and continue processing.

Parameters:
request - The request object.
response - The response object.
Returns:
The action to be taken as a result of this filter.
Throws:
FilterException - A filter-specific exception occurred.
WSGWException - An error occurred.
java.rmi.RemoteException - Required for EJB remote interfaces.
See Also:

getVersionString

public java.lang.String getVersionString()
                                  throws java.rmi.RemoteException
This method returns a string form of the version of the filter implementation.

This is used by the Gateway when logging events relating to the filter so that the exact version of the filter implementation is known.

Parameters:
-  
Returns:
The version string.
Throws:
java.rmi.RemoteException - Required for EJB remote interfaces.
See Also:

getContextVersion

public int getContextVersion()
                      throws java.rmi.RemoteException
This method returns an int to indicate the method that this filter uses to access context information. The value returned must correspond to one of the pre-defined constants in the Filter interface.
Parameters:
-  
Returns:
The context version
Throws:
java.rmi.RemoteException - Required for EJB remote interfaces.
See Also:

init

public void init(java.lang.String filterName)
          throws WSGWException,
                 java.rmi.RemoteException
Notifies the filter that it has been configured for the WebServices Gateway.

This provides the filter with an opportunity to do any initial setup tasks.

Parameters:
filterName - The filter name.
Returns:
 
Throws:
WSGWException - An error occurred initializing the filter.
java.rmi.RemoteException - Required for EJB remote interfaces.
See Also:

destroy

public void destroy(java.lang.String filterName)
             throws WSGWException,
                    java.rmi.RemoteException
Notifies the filter that it has been removed from the WebServices Gateway.

This provides the filter with an opportunity to do any cleanup tasks.

Parameters:
filterName - The filter name.
Returns:
 
Throws:
WSGWException - An error occurred removing the filter.
java.rmi.RemoteException - Required for EJB remote interfaces.
See Also:


Copyright © 2002 IBM. All Rights Reserved.