com.ibm.wbi.plugin
Class RequestEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--com.ibm.wbi.plugin.RequestEvent

public class RequestEvent
extends java.util.EventObject

The request event that is passed to each meg that contains the input and output streams and meg data.

See Also:
Serialized Form

Field Summary
static java.lang.String COPYRIGHT
          IBM copyright information.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
RequestEvent(java.lang.Object source, Request request, MegInputStream in, MegOutputStream out, com.ibm.wbi.plugin.MegChainCoordinater bucket)
          Constructs a new request event with the specified parameters.
 
Method Summary
 com.ibm.wbi.plugin.MegChainCoordinater getChain()
          Get the meg bucket associated with this request whcih determines the meg chaining.
 MegInputStream getRead()
          Get the input stream.
 Request getRequest()
          Get the request associated with this event.
 RequestInfo getRequestInfo()
          The is the "safe" way of obtaining the RequestInfo object for a particular RequestEvent (as opposed to obtaining the RequestInfo from the input or output stream).
 MegOutputStream getWrite()
          Get the output stream.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
IBM copyright information.
Constructor Detail

RequestEvent

public RequestEvent(java.lang.Object source,
                    Request request,
                    MegInputStream in,
                    MegOutputStream out,
                    com.ibm.wbi.plugin.MegChainCoordinater bucket)
Constructs a new request event with the specified parameters.
Parameters:
source - The source of the request event.
request - The request associated with this request event.
in - The input stream from which to read the request/response.
out - The output stream to write request/response data.
bucket - The meg bucket for this request.
Method Detail

getRead

public MegInputStream getRead()
Get the input stream.
Returns:
The input stream.

getWrite

public MegOutputStream getWrite()
Get the output stream. Once the output stream is written to, a request can not be rejected and the request info object is copied and the next meg is dispatched.
Returns:
The output stream.

getChain

public com.ibm.wbi.plugin.MegChainCoordinater getChain()
Get the meg bucket associated with this request whcih determines the meg chaining. Any changes invoked on the chain should be done before the next meg is dispatched (i.e. before the first write() call).
Returns:
The chain coordinater.

getRequestInfo

public RequestInfo getRequestInfo()
The is the "safe" way of obtaining the RequestInfo object for a particular RequestEvent (as opposed to obtaining the RequestInfo from the input or output stream). This always returns the input stream RequestInfo because this will influence the meg chaining before the first write() call to the output stream. After this point, we don't want the meg to "interfere" with the chaining by modifying the cloned RequestInfo which the subsequent spawned meg is now using.
Returns:
The RequestInfo object describing the request.

getRequest

public Request getRequest()
Get the request associated with this event.
Returns:
The request.