All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface com.visigenic.vbroker.interceptor.ServerInterceptor

public interface ServerInterceptor

IDL definition:
interface ServerInterceptor {
::IOP::IOR locate(
in unsigned long req_id,
in ::CORBA::OctetSequence object_key,
in ::interceptor::Closure closure
);
void locate_succeeded(
in unsigned long req_id,
in ::interceptor::Closure closure
);
void locate_forwarded(
in unsigned long req_id,
inout ::IOP::IOR forward_ior,
in ::interceptor::Closure closure
);
::IOP::IOR locate_failed(
in unsigned long req_id,
in ::CORBA::OctetSequence object_key,
in ::interceptor::Closure closure
);
::CORBA::portable::InputStream receive_request(
in ::GIOP::RequestHeader hdr,
inout Object target,
in ::CORBA::portable::InputStream buf,
in ::interceptor::Closure closure
);
void prepare_reply(
in ::GIOP::RequestHeader hdr,
inout ::GIOP::ReplyHeader reply,
in Object target,
in ::interceptor::Closure closure
);
::CORBA::portable::OutputStream send_reply(
in ::GIOP::RequestHeader reqHdr,
in ::GIOP::ReplyHeader hdr,
in Object target,
in ::CORBA::portable::OutputStream buf,
in ::CORBA::Environment env,
in ::interceptor::Closure closure
);
void send_reply_failed(
in ::GIOP::RequestHeader reqHdr,
in ::GIOP::ReplyHeader replyHdr,
in Object target,
in ::CORBA::Environment env,
in ::interceptor::Closure closure
);
void request_completed(
in ::GIOP::RequestHeader reqHdr,
in Object target,
in ::interceptor::Closure closure
);
enum ShutdownReason {
CLIENT_ABORTED,
SERVER_RESOURCES_EXCEEDED
};
void shutdown(
in ::interceptor::ServerInterceptor::ShutdownReason reason
);
void exception_occurred(
in ::GIOP::RequestHeader reqHdr,
in ::CORBA::Environment env,
in ::interceptor::Closure closure
);
};

Server side interceptor. There is normally "one interceptor" for each "client connection"


Method Index

 o exception_occurred(RequestHeader, Environment, Closure)

Operation: ::interceptor::ServerInterceptor::exception_occurred.

 o locate(int, byte[], Closure)
The locate method is called whenever a LocateRequest message is received by the server.
 o locate_failed(int, byte[], Closure)
Called if locate failed.
 o locate_forwarded(int, IORHolder, Closure)
Called if locate forwarded.
 o locate_succeeded(int, Closure)
Called if locate succeeded

Operation: ::interceptor::ServerInterceptor::locate_succeeded.

 o prepare_reply(RequestHeader, ReplyHeaderHolder, Object, Closure)
Function called when the reply header is being prepared NOTE: request_failed can be called before prepare_reply.
 o receive_request(RequestHeader, ObjectHolder, InputStream, Closure)
Called when a request message is recived from client If return value is "not null", that buffer is passed onto target.
 o request_completed(RequestHeader, Object, Closure)
Function called when request completed.
 o send_reply(RequestHeader, ReplyHeader, Object, OutputStream, Environment, Closure)
Function called when reply is being sent.
 o send_reply_failed(RequestHeader, ReplyHeader, Object, Environment, Closure)
Function called if send failed.
 o shutdown(ShutdownReason)

Operation: ::interceptor::ServerInterceptor::shutdown.

Methods

 o locate
 public abstract IOR locate(int req_id,
                            byte object_key[],
                            Closure closure)
The locate method is called whenever a LocateRequest message is received by the server.

Operation: ::interceptor::ServerInterceptor::locate.

::IOP::IOR locate(
in unsigned long req_id,
in ::CORBA::OctetSequence object_key,
in ::interceptor::Closure closure
);

Parameters:
req_id - The request id of the LocateRequest recieved by the server.
object_key - The object_key specified in the LocateRequest.
closure - A new closure object to be used for all calls related to the processing of this locate request.
Returns:
An IOR to send in the LocateReply message or null if the ORB's default should be used.
 o locate_succeeded
 public abstract void locate_succeeded(int req_id,
                                       Closure closure)
Called if locate succeeded

Operation: ::interceptor::ServerInterceptor::locate_succeeded.

void locate_succeeded(
in unsigned long req_id,
in ::interceptor::Closure closure
);

Parameters:
req_id - The request id of the LocateRequest recieved by the server.
closure - The closure object originally passed to the locate call.
 o locate_forwarded
 public abstract void locate_forwarded(int req_id,
                                       IORHolder forward_ior,
                                       Closure closure)
Called if locate forwarded.

Operation: ::interceptor::ServerInterceptor::locate_forwarded.

void locate_forwarded(
in unsigned long req_id,
inout ::IOP::IOR forward_ior,
in ::interceptor::Closure closure
);

Parameters:
req_id - The request id of the LocateRequest recieved by the server.
forward_ior - An IOR indicating the forwarded object reference.
closure - The closure object originally passed to the locate call.
 o locate_failed
 public abstract IOR locate_failed(int req_id,
                                   byte object_key[],
                                   Closure closure)
Called if locate failed.

Operation: ::interceptor::ServerInterceptor::locate_failed.

::IOP::IOR locate_failed(
in unsigned long req_id,
in ::CORBA::OctetSequence object_key,
in ::interceptor::Closure closure
);

Parameters:
req_id - The request id of the LocateRequest recieved by the server.
object_key - The object_key specified in the LocateRequest.
closure - The closure object originally passed to the locate call.
Returns:
An IOR to to return to the client or null to use the ORB's default behavior.
 o receive_request
 public abstract InputStream receive_request(RequestHeader hdr,
                                             ObjectHolder target,
                                             InputStream buf,
                                             Closure closure)
Called when a request message is recived from client If return value is "not null", that buffer is passed onto target. It also possible to change the hdr and forward the request to a different operation or to a different Object.

Operation: ::interceptor::ServerInterceptor::receive_request.

::CORBA::portable::InputStream receive_request(
in ::GIOP::RequestHeader hdr,
inout Object target,
in ::CORBA::portable::InputStream buf,
in ::interceptor::Closure closure
);

Parameters:
hdr - The RequestHeader received by the server.
target - An object specifying the target of the operation. Teh interceptor may change this value.
buf - An input stream containing all of the marshalled data received from the client.
closure - A new closure object to be used for all interceptor calls related to this request.
Returns:
An input stream to replace the one received by the ORB or null if the ORB should use the orginial input stream.
 o prepare_reply
 public abstract void prepare_reply(RequestHeader hdr,
                                    ReplyHeaderHolder reply,
                                    Object target,
                                    Closure closure)
Function called when the reply header is being prepared NOTE: request_failed can be called before prepare_reply.

Operation: ::interceptor::ServerInterceptor::prepare_reply.

void prepare_reply(
in ::GIOP::RequestHeader hdr,
inout ::GIOP::ReplyHeader reply,
in Object target,
in ::interceptor::Closure closure
);

 o send_reply
 public abstract OutputStream send_reply(RequestHeader reqHdr,
                                         ReplyHeader hdr,
                                         Object target,
                                         OutputStream buf,
                                         Environment env,
                                         Closure closure)
Function called when reply is being sent. If return value is "not null", that value is sent to client. The env passed will contain any user exceptions, if they were thrown.

Operation: ::interceptor::ServerInterceptor::send_reply.

::CORBA::portable::OutputStream send_reply(
in ::GIOP::RequestHeader reqHdr,
in ::GIOP::ReplyHeader hdr,
in Object target,
in ::CORBA::portable::OutputStream buf,
in ::CORBA::Environment env,
in ::interceptor::Closure closure
);

 o send_reply_failed
 public abstract void send_reply_failed(RequestHeader reqHdr,
                                        ReplyHeader replyHdr,
                                        Object target,
                                        Environment env,
                                        Closure closure)
Function called if send failed.

Operation: ::interceptor::ServerInterceptor::send_reply_failed.

void send_reply_failed(
in ::GIOP::RequestHeader reqHdr,
in ::GIOP::ReplyHeader replyHdr,
in Object target,
in ::CORBA::Environment env,
in ::interceptor::Closure closure
);

 o request_completed
 public abstract void request_completed(RequestHeader reqHdr,
                                        Object target,
                                        Closure closure)
Function called when request completed. Gets called in the following cases. 1. If oneway call and request completed successfully. NOTE: If request failed exception_occured gets called. 2. If regular call gets called after a reply is sent successfully to the client. NOTE: If sending the reply to client fails, send reply failed gets called.

Operation: ::interceptor::ServerInterceptor::request_completed.

void request_completed(
in ::GIOP::RequestHeader reqHdr,
in Object target,
in ::interceptor::Closure closure
);

 o shutdown
 public abstract void shutdown(ShutdownReason reason)

Operation: ::interceptor::ServerInterceptor::shutdown.

void shutdown(
in ::interceptor::ServerInterceptor::ShutdownReason reason
);

 o exception_occurred
 public abstract void exception_occurred(RequestHeader reqHdr,
                                         Environment env,
                                         Closure closure)

Operation: ::interceptor::ServerInterceptor::exception_occurred.

void exception_occurred(
in ::GIOP::RequestHeader reqHdr,
in ::CORBA::Environment env,
in ::interceptor::Closure closure
);


All Packages  Class Hierarchy  This Package  Previous  Next  Index