VisiBroker for Java

com.inprise.vbroker.interceptor
Interface ServerRequestInterceptor

All Superinterfaces:
IDLEntity, java.io.Serializable

public interface ServerRequestInterceptor
extends IDLEntity

The ServerRequestInterceptor interface is a per-POA interceptor which may be installed by a POALifeCycleInterceptor at POA creation time. This interface may be used to perform access control, to examine and insert service contexts, and to change the reply status of a request.


Method Summary
 void exception_occurred(Object target, Environment env, Closure closure)
          This method is invoked if an exception is raised at any point of request processing.
 void postinvoke_postmarshal(Object target, OutputStream payload, Closure closure)
          This method is invoked after marshalling the reply but before sending the reply to the client.
 void postinvoke_premarshal(Object target, com.inprise.vbroker.IOP.ServiceContextListHolder service_contexts, Environment env, Closure closure)
          The postinvoke interceptor is called after every request has completed.
 void preinvoke(Object target, java.lang.String operation, ServiceContext[] service_contexts, InputStream payload, Closure closure)
          This method is invoked by the ORB on every request, as soon as the request arrives on the server side.
 

Method Detail

exception_occurred

void exception_occurred(Object target,
                        Environment env,
                        Closure closure)
This method is invoked if an exception is raised at any point of request processing. An exception thrown during this call replaces the existing exception in the environment.

Parameters:
target - The object on which the request is invoked.
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_postmarshal

void postinvoke_postmarshal(Object target,
                            OutputStream payload,
                            Closure closure)
This method is invoked after marshalling the reply but before sending the reply to the client. Exceptions thrown here are ignored. The entire chain is guaranteed to be called.

Parameters:
target - The object on which the request is invoked.
payload - Marshalled buffer.
closure - May contain data saved by one interceptor method that can be retrieved later by another interceptor method.

postinvoke_premarshal

void postinvoke_premarshal(Object target,
                           com.inprise.vbroker.IOP.ServiceContextListHolder service_contexts,
                           Environment env,
                           Closure closure)
The postinvoke interceptor is called after every request has completed. It is called after the ServantLocator has been invoked. This method is invoked after an upcall to the servant but before marshalling the reply. An exception here is handled by interrupting the chain and exception_occurred() is called on all interceptors in the chain Any exception thrown in this method will replace the exception thrown by the applicatin program.

Parameters:
target - The object on which the request was invoked.
service_contexts - Identifies the services assigned by the ORB. These services are registered with the OMG.
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

void preinvoke(Object target,
               java.lang.String operation,
               ServiceContext[] service_contexts,
               InputStream payload,
               Closure closure)
               throws ForwardRequestException
This method is invoked by the ORB on every request, as soon as the request arrives on the server side. An exception thrown from this interceptor will result in the request being completed immediately. This method is called before any Servant Locators are invoked. Due to this, the servant may not be available.

Parameters:
target - The object on which the request is invoked.
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.
payload - Marshalled buffer.
closure - May contain data saved by one interceptor method that can be retrieved later by another interceptor method.
Throws:
ForwardRequestException - Forward request to another object.

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