| IBM WebSphere Extended Deployment (XD)TM
Release 6.0 |
com.ibm.wsspi.giop.filter
GiopFilter
All Implemented Interfaces
-
FilterLifecycle
This class has been picked up from the proxy component.
Defines methods that all GIOP filters must implement.
Refer to com.ibm.wsspi.filter.FilterLifecycle for a complete description of filters.
After a filter is properly initialized, the proxy may route traffic to it. As traffic flows through
each filter point, the proxy invokes active filter's doFilter
method.
The proxy may send concurrent events through #doFilter methods of a filter.
If your filter only reads and writes to the request and response objects, or utilizes
local (i.e. declared local to the method) variables, you need not worry about interactions
between threads. However, once information is saved in non-local (i.e. variables declared
at the class level) variables, you must be aware that each thread of execution has the
ability to manipulate the filter's non-local variables. Without precautions, this may
result in data inconsistencies and corruption. To handle this, filter developers must
implement one of the following concurrency mechanisms:
- Add the
synchronized
keyword to the doFilter
method.
- Synchronize the lines you want to execute atomically. In effect, narrow the scope of
the synchronization defined by #1.
- Decide that you can live with the consequences of non-synchronization.
Implementations of a proxy service context and its constituent objects (e.g. request
object, response object) are not guaranteed to be thread safe. This means that they should
only be used within the scope of the event handling thread. References to these objects
must be given with care to objects executing in other threads, as the resulting behavior
is non-deterministic.
Method Summary |
public
GiopFilterStatusCodes | doFilter(com.ibm.wsspi.giop.filter.GiopProxyServiceContext)
Called by the proxy to allow the filter to service an event. .
|
Inherited Methods
Methods inherited from com.ibm.wsspi.filter.FilterLifecycle |
destroy, init |
doFilter
public GiopFilterStatusCodes doFilter( | | GiopProxyServiceContext serviceContext )
|
Called by the proxy to allow the filter to service an event.
This method is declared abstract so subclasses must override it. Refer to
GiopFilter for an overview of multithreading and object lifetime issues
that must be adhered to when implementing this method.
Parameters:
serviceContext
-
The event to be processed; provides access to request and response objects.
Returns:
=STATUS_FILTER_CONTINUE
when filter event processing succeeds and chaining should continue.
=STATUS_FILTER_WAIT
When a filter wants to suspend further processing on the service context
until it is resumed. The next filter in the chain will receive control after the service context is
resumed. This status code cannot be used by local provider filters or "response" filters.
=STATUS_FILTER_ABORT
When a filter wants to abort further processing on the service context.
It is expected that the filter will set the response to be sent to the client, if not a standard error response
will be sent to the client.
Throws:
java.lang.Exception
| IBM WebSphere Extended Deployment (XD)TM
Release 6.0 |