VisiBroker for Java

com.inprise.vbroker.interceptor
Class ExtendedClosure

java.lang.Object
  extended by com.inprise.vbroker.interceptor.Closure
      extended by com.inprise.vbroker.interceptor.ExtendedClosure

public class ExtendedClosure
extends Closure

This interface is a derived class of Closure and contains a RequestInfo structure. You can cast the Closure object passed to the ServerRequestInterceptor and eClientRequestInterceptor to its subclass, ExtendedClosure. ExtendedClosure can be used to extract the RequestInfo, from which you can extract the request_id and response_expected. The request_id is the unique id assigned to the request. The response_expected flag indicates whether the request is a one-way call. For more information, please see the example in interceptors/client_server.

Note: If you want to modify the InputStream, you must use the payload parameter of the ExtendedClosure. The payload attribute of the request interceptor is read-only; it does not allow you to change the InputStream. For this reason, ExtendedClosure provides a read-write InputStream payload parameter. The main purpose of the payload attribute is to allow a new InputStream to be used in place of the old one.

The example interceptors/encryption shows how to use ExtendedClosure's payload attribute. In this example, when the interceptor tries to decrypt the data in an encrypted InputStream, a new InputStream containing the decrypted message needs to be created.ExtendedClosure serves as a holder for the InputStream. When the payload is assigned to the newly-created InputStream, that InputStream becomes the InputStream associated with the request.


Field Summary
 InputStream payload
          Allows a new input stream to be used in place of the old one.
 RequestInfo reqInfo
          Provides additional information about the current request in the interceptor chain.
 
Fields inherited from class com.inprise.vbroker.interceptor.Closure
object
 
Constructor Summary
ExtendedClosure()
           
 
Method Summary
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

reqInfo

public RequestInfo reqInfo
Provides additional information about the current request in the interceptor chain.


payload

public InputStream payload
Allows a new input stream to be used in place of the old one.

Constructor Detail

ExtendedClosure

public ExtendedClosure()

Borland Software Corporation
http://www.borland.com
100 Enterprise Way
Scotts Valley, CA 95066
Voice: (831) 431-1000
pubsweb@borland.com

Read the latest documentation online