VisiBroker for Java

com.inprise.vbroker.interceptor
Interface ClientRequestInterceptor

All Superinterfaces:
IDLEntity, java.io.Serializable

public interface ClientRequestInterceptor
extends IDLEntity

You use this interface to derive your own client-side interceptor, providing implementations for those methods that you wish to override. The Client Request interceptors may be installed during the bind_succeeded call of a bind interceptor and remain active for the duration of the connection. The methods defined in your derived class will be invoked by the ORB during the preparation or sending of an operation request, during the receipt of a reply message, or if an exception is raised.


Method Summary
 void exception_occurred(Object target, Environment env, Closure closure)
          This method is invoked by the ORB when an exception was thrown before the invocation.
 void postinvoke(Object target, ServiceContext[] service_contexts, InputStream payload, Environment env, Closure closure)
          This method is invoked after a request has completed.
 void preinvoke_postmarshal(Object target, OutputStream payload, Closure closure)
          This method is invoked after every request has been marshaled, but before it was sent.
 void preinvoke_premarshal(Object target, java.lang.String operation, com.inprise.vbroker.IOP.ServiceContextListHolder service_contexts, Closure closure)
          This method is invoked by the ORB on every request, before the request is marshaled.
 

Method Detail

exception_occurred

void exception_occurred(Object target,
                        Environment env,
                        Closure closure)
This method is invoked by the ORB when an exception was thrown before the invocation.

Parameters:
target - The client object which is being bound to the server.
env - Contains information on the exception that was raised.
closure - May contain data saved by one interceptor method that can be retrieved later by another interceptor method.

postinvoke

void postinvoke(Object target,
                ServiceContext[] service_contexts,
                InputStream payload,
                Environment env,
                Closure closure)
This method is invoked after a request has completed.

Parameters:
target - The client object which is being bound to the server.
service_contexts - Identifies the services assigned by the ORB. These services are registered with the OMG
payload - Marshalled buffer.
env - Contains information on the exception that was raised.
closure - May contain data saved by one interceptor method that can be retrieved later by another interceptor method.

preinvoke_postmarshal

void preinvoke_postmarshal(Object target,
                           OutputStream payload,
                           Closure closure)
This method is invoked after every request has been marshaled, but before it was sent. Any exception thrown in this method will cause the rest of the chain to not be invoked anymore. The request will not be sent to the server and exception_occurred() will subsequently be called on all the interceptors whose preinvoke_postmarshal has been called.

Parameters:
target - The client object which is being bound to the server.
payload - Marshalled buffer.
closure - May contain data saved by one interceptor method that can be retrieved later by another interceptor method.

preinvoke_premarshal

void preinvoke_premarshal(Object target,
                          java.lang.String operation,
                          com.inprise.vbroker.IOP.ServiceContextListHolder service_contexts,
                          Closure closure)
This method is invoked by the ORB on every request, before the request is marshaled. An exception thrown from this interceptor will result in the request being completed immediately The chain will be shortened to only those interceptors that have already fired. The request is not sent and exception_occurred() is called on all interceptors whose preinvoke_premarshal has been called.

Parameters:
target - The client object which is being bound to the server.
operation - Identifies the name of the operation being invoked.
service_contexts - Identifies the services assigned by the ORB. These services are registered with the OMG.
closure - May contain data saved by one interceptor method that can be retrieved later by another interceptor method.

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