public class PIHandlerImpl extends Object implements PIHandler
Constructor and Description |
---|
PIHandlerImpl(ORB orb,
String[] args) |
Modifier and Type | Method and Description |
---|---|
void |
adapterManagerStateChanged(int managerId,
short newState)
Called whenever a state change occurs in an adapter manager.
|
void |
adapterStateChanged(ObjectReferenceTemplate[] templates,
short newState)
Called whenever a state change occurs in an object adapter that
was not caused by an adapter manager state change.
|
int |
allocateServerRequestId() |
void |
cleanupClientPIRequest()
Invoked when a request is about to be cleaned up.
|
void |
cleanupServerPIRequest()
Invoked when a request is about to be cleaned up.
|
void |
close() |
Policy |
create_policy(int type,
Any val)
This is the implementation of standard API defined in org.omg.CORBA.ORB
class.
|
void |
destroyInterceptors()
ptc/00-08-06 p 205: "When an application calls ORB::destroy, the ORB
1) waits for all requests in progress to complete
2) calls the Interceptor::destroy operation for each interceptor
3) completes destruction of the ORB"
This must be called at the end of ORB.destroy.
|
void |
disableInterceptorsThisThread()
Called for pseudo-ops to temporarily disable portable interceptor
hooks for calls on this thread.
|
void |
enableInterceptorsThisThread()
Called for pseudo-ops to re-enable portable interceptor
hooks for calls on this thread.
|
Current |
getPICurrent() |
Exception |
handleClientPIEndingPoint(int replyStatus,
Exception exception,
boolean invokeEndingPoint) |
void |
initialize()
Complete the initialization of the PIHandler.
|
void |
initializeServerPIInfo(CorbaMessageMediator request,
ObjectAdapter oa,
byte[] objectId,
ObjectKeyTemplate oktemp)
Notifies PI to start a new server request and set initial
information for server-side interceptors.
|
void |
initiateClientPIRequest(boolean diiRequest)
Invoked when a request is about to be created.
|
Exception |
invokeClientPIEndingPoint(int replyStatus,
Exception exception)
Called when the appropriate client ending interception point is
to be invoked for all apporpriate client-side request interceptors.
|
void |
invokeClientPIStartingPoint()
Called when the send_request or send_poll portable interception point
is to be invoked for all appropriate client-side request interceptors.
|
void |
invokeServerPIEndingPoint(ReplyMessage replyMessage)
Called when the appropriate server ending interception point is
to be invoked for all appropriate server-side request interceptors.
|
void |
invokeServerPIIntermediatePoint()
Called when the appropriate server intermediate interception point is
to be invoked for all appropriate server-side request interceptors.
|
void |
invokeServerPIStartingPoint()
Called when the appropriate server starting interception point is
to be invoked for all appropriate server-side request interceptors.
|
Exception |
makeCompletedClientRequest(int replyStatus,
Exception exception)
Called when a retry is needed after initiateClientPIRequest but
before invokeClientPIRequest.
|
void |
objectAdapterCreated(ObjectAdapter oa)
Called when a new object adapter is created.
|
void |
register_interceptor(Interceptor interceptor,
int type)
Called by ORBInitInfo when an interceptor needs to be registered.
|
void |
registerPolicyFactory(int type,
PolicyFactory factory)
This method registers the Policy Factory in the policyFactoryTable,
which is a HashMap.
|
void |
setClientPIInfo(CorbaMessageMediator messageMediator)
Notify PI of the MessageMediator for the request.
|
void |
setClientPIInfo(RequestImpl requestImpl)
Notifies PI of additional information for client-side interceptors.
|
void |
setServerPIExceptionInfo(Any exception)
Notifies PI of additional information for server-side interceptors.
|
void |
setServerPIInfo(Any result)
Notifies PI of additional information for server-side interceptors.
|
void |
setServerPIInfo(Exception exception)
Notifies PI of additional information required for ServerRequestInfo.
|
void |
setServerPIInfo(NVList arguments)
Notifies PI of additional information for server-side interceptors.
|
void |
setServerPIInfo(Object servant,
String targetMostDerivedInterface)
Notifies PI of additional information reqired for ServerRequestInfo.
|
public void close()
close
in interface Closeable
close
in interface AutoCloseable
public void initialize()
PIHandler
initialize
in interface PIHandler
public void destroyInterceptors()
destroyInterceptors
in interface PIHandler
public void objectAdapterCreated(ObjectAdapter oa)
PIHandler
objectAdapterCreated
in interface PIHandler
oa
- The adapter associated with the interceptors to be
invoked.public void adapterManagerStateChanged(int managerId, short newState)
PIHandler
adapterManagerStateChanged
in interface PIHandler
managerId
- managerId The adapter manager idnewState
- newState The new state of the adapter manager,
and by implication of all object adapters managed by this manager.public void adapterStateChanged(ObjectReferenceTemplate[] templates, short newState)
PIHandler
adapterStateChanged
in interface PIHandler
templates
- The templates that are changing state.newState
- The new state of the adapters identified by the
templates.public void disableInterceptorsThisThread()
PIHandler
disableInterceptorsThisThread
in interface PIHandler
public void enableInterceptorsThisThread()
PIHandler
enableInterceptorsThisThread
in interface PIHandler
public void invokeClientPIStartingPoint() throws RemarshalException
PIHandler
invokeClientPIStartingPoint
in interface PIHandler
RemarshalException
public Exception makeCompletedClientRequest(int replyStatus, Exception exception)
PIHandler
makeCompletedClientRequest
in interface PIHandler
replyStatus
- One of the constants in iiop.messages.ReplyMessage
indicating which reply status to set.exception
- The exception before ending interception points have
been invoked, or null if no exception at the moment.public Exception invokeClientPIEndingPoint(int replyStatus, Exception exception)
PIHandler
invokeClientPIEndingPoint
in interface PIHandler
replyStatus
- One of the constants in iiop.messages.ReplyMessage
indicating which reply status to set.exception
- The exception before ending interception points have
been invoked, or null if no exception at the moment.public Exception handleClientPIEndingPoint(int replyStatus, Exception exception, boolean invokeEndingPoint)
public void initiateClientPIRequest(boolean diiRequest)
PIHandler
initiateClientPIRequest
in interface PIHandler
diiRequest
- True if this is to be a DII request, or false if it
is a "normal" request. In the DII case, initiateClientPIRequest
is called twice and we need to ignore the second one.public void cleanupClientPIRequest()
PIHandler
cleanupClientPIRequest
in interface PIHandler
public void setClientPIInfo(CorbaMessageMediator messageMediator)
PIHandler
setClientPIInfo
in interface PIHandler
public void setClientPIInfo(RequestImpl requestImpl)
PIHandler
setClientPIInfo
in interface PIHandler
public void invokeServerPIStartingPoint()
PIHandler
invokeServerPIStartingPoint
in interface PIHandler
public void invokeServerPIIntermediatePoint()
PIHandler
invokeServerPIIntermediatePoint
in interface PIHandler
public void invokeServerPIEndingPoint(ReplyMessage replyMessage)
PIHandler
invokeServerPIEndingPoint
in interface PIHandler
replyMessage
- The iiop.messages.ReplyMessage containing the
reply status.public void setServerPIInfo(Exception exception)
PIHandler
setServerPIInfo
in interface PIHandler
public void setServerPIInfo(NVList arguments)
PIHandler
setServerPIInfo
in interface PIHandler
public void setServerPIExceptionInfo(Any exception)
PIHandler
setServerPIExceptionInfo
in interface PIHandler
public void setServerPIInfo(Any result)
PIHandler
setServerPIInfo
in interface PIHandler
public void initializeServerPIInfo(CorbaMessageMediator request, ObjectAdapter oa, byte[] objectId, ObjectKeyTemplate oktemp)
PIHandler
initializeServerPIInfo
in interface PIHandler
public void setServerPIInfo(Object servant, String targetMostDerivedInterface)
PIHandler
setServerPIInfo
in interface PIHandler
servant
- The servant. This is java.lang.Object because in the
POA case, this will be a org.omg.PortableServer.Servant whereas
in the ServerRequestDispatcher case this will be an ObjectImpl.public void cleanupServerPIRequest()
PIHandler
cleanupServerPIRequest
in interface PIHandler
public void register_interceptor(Interceptor interceptor, int type) throws DuplicateName
register_interceptor
in interface PIHandler
DuplicateName
- Thrown if an interceptor of the given
name already exists for the given type.public Current getPICurrent()
getPICurrent
in interface PIHandler
public Policy create_policy(int type, Any val) throws PolicyError
create_policy
in interface PIHandler
PolicyError
public void registerPolicyFactory(int type, PolicyFactory factory)
registerPolicyFactory
in interface PIHandler
public int allocateServerRequestId()
allocateServerRequestId
in interface PIHandler
Copyright © 2019 JBoss by Red Hat. All rights reserved.