Class ClientRequestInfoImpl
- java.lang.Object
-
- org.omg.CORBA.LocalObject
-
- com.sun.corba.ee.impl.interceptors.RequestInfoImpl
-
- com.sun.corba.ee.impl.interceptors.ClientRequestInfoImpl
-
- All Implemented Interfaces:
RequestInfoExt
,java.io.Serializable
,Object
,IDLEntity
,ClientRequestInfo
,ClientRequestInfoOperations
,RequestInfo
,RequestInfoOperations
public final class ClientRequestInfoImpl extends RequestInfoImpl implements ClientRequestInfo
Implementation of the ClientRequestInfo interface as specified in orbos/99-12-02 section 5.4.2.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.sun.corba.ee.impl.interceptors.RequestInfoImpl
connection, currentExecutionPoint, endingPointCall, exception, EXECUTION_POINT_ENDING, EXECUTION_POINT_INTERMEDIATE, EXECUTION_POINT_STARTING, interceptorsEnabledForThisRequest, intermediatePointCall, MID_ARGUMENTS, MID_CONTEXTS, MID_EXCEPTIONS, MID_FORWARD_REFERENCE, MID_GET_REPLY_SERVICE_CONTEXT, MID_GET_REQUEST_SERVICE_CONTEXT, MID_GET_SLOT, MID_OPERATION, MID_OPERATION_CONTEXT, MID_REPLY_STATUS, MID_REQUEST_ID, MID_RESPONSE_EXPECTED, MID_RESULT, MID_RI_LAST, MID_SYNC_SCOPE, myORB, replyStatus, slotTable, startingPointCall, stdWrapper, UNINITIALIZED, wrapper
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ClientRequestInfoImpl(ORB myORB)
Creates a new ClientRequestInfo implementation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add_request_service_context(ServiceContext service_context, boolean replace)
Allows interceptors to add service contexts to the request.Parameter[]
arguments()
See RequestInfoImpl for javadoc.protected void
checkAccess(int methodID)
See description for RequestInfoImpl.checkAccessConnection
connection()
java.lang.String[]
contexts()
See RequestInfoImpl for javadoc.(package private) void
decrementEntryCount()
Decreases the entry count by 1.TaggedProfile
effective_profile()
The profile that will be used to send the request.Object
effective_target()
The actual object on which the operation will be invoked.private void
entryCount(int count)
TypeCode[]
exceptions()
See RequestInfoImpl for javadoc.Object
forward_reference()
See RequestInfoImpl for javadoc.TaggedComponent
get_effective_component(int id)
Returns the IOP::TaggedComponent with the given ID from the profile selected for this request.TaggedComponent[]
get_effective_components(int id)
Returns all the tagged components with the given ID from the profile selected for this request.ServiceContext
get_reply_service_context(int id)
does not contain an etry for that ID, BAD_PARAM with a minor code of TBD_BP is raised.Policy
get_request_policy(int type)
Returns the given policy in effect for this operation.ServiceContext
get_request_service_context(int id)
See RequestInfoImpl for javadoc.(package private) int
getEntryCount()
Retrieve the current entry countprotected boolean
getIsOneWay()
private IOR
getLocatedIOR()
protected short
getReplyStatus()
Gets the current reply_status without doing an access check (available only to package and subclasses)(package private) RetryType
getRetryRequest()
Retrieve the current retry request status.(package private) void
incrementEntryCount()
Increases the entry count by 1.protected boolean
isDIIInitiate()
protected boolean
isPICurrentPushed()
java.lang.String
operation()
See RequestInfoImpl for javadoc.java.lang.String[]
operation_context()
See RequestInfoImpl for javadoc.Any
received_exception()
Contains the exception to be returned to the client.java.lang.String
received_exception_id()
The CORBA::RepositoryId of the exception to be returned to the client.int
request_id()
See RequestInfoImpl for javadoc.(package private) void
reset()
Reset the info object so that it can be reused for a retry, for example.boolean
response_expected()
See RequestInfoImpl for javadoc.Any
result()
See RequestInfoImpl for javadoc.protected void
setDIIInitiate(boolean diiInitiate)
Keeps track of whether initiate was called for a DII request.protected void
setDIIRequest(Request req)
Sets DII request object in the RequestInfoObject.protected void
setException(java.lang.Exception exception)
Overridden from RequestInfoImpl.protected void
setInfo(MessageMediator messageMediator)
void
setLocatedIOR(IOR ior)
protected void
setPICurrentPushed(boolean piCurrentPushed)
The PICurrent stack should only be popped if it was pushed.protected void
setReplyStatus(short replyStatus)
Overridden from RequestInfoImpl.(package private) void
setRetryRequest(RetryType retryRequest)
Set or reset the retry request flag.Object
target()
The object which the client called to perform the operation.java.lang.String
toString()
-
Methods inherited from class com.sun.corba.ee.impl.interceptors.RequestInfoImpl
_orb, addServiceContext, exceptionToAny, get_slot, getAlreadyExecuted, getEndingPointCall, getException, getFlowStackIndex, getForwardRequestException, getForwardRequestIOR, getIntermediatePointCall, getServiceContext, getStartingPointCall, iorToObject, nvListToParameterArray, reply_status, setAlreadyExecuted, setCurrentExecutionPoint, setEndingPointCall, setFlowStackIndex, setForwardRequest, setForwardRequest, setIntermediatePointCall, setSlotTable, setStartingPointCall, sync_scope
-
Methods inherited from class org.omg.CORBA.LocalObject
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface, _get_interface_def, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_policy_override, validate_connection
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.omg.CORBA.Object
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
-
Methods inherited from interface org.omg.PortableInterceptor.RequestInfoOperations
get_slot, reply_status, sync_scope
-
-
-
-
Field Detail
-
CALL_SEND_REQUEST
static final int CALL_SEND_REQUEST
- See Also:
- Constant Field Values
-
CALL_SEND_POLL
static final int CALL_SEND_POLL
- See Also:
- Constant Field Values
-
CALL_RECEIVE_REPLY
static final int CALL_RECEIVE_REPLY
- See Also:
- Constant Field Values
-
CALL_RECEIVE_EXCEPTION
static final int CALL_RECEIVE_EXCEPTION
- See Also:
- Constant Field Values
-
CALL_RECEIVE_OTHER
static final int CALL_RECEIVE_OTHER
- See Also:
- Constant Field Values
-
retryRequest
private RetryType retryRequest
-
entryCount
private int entryCount
-
request
private Request request
-
diiInitiate
private boolean diiInitiate
-
messageMediator
private MessageMediator messageMediator
-
cachedTargetObject
private Object cachedTargetObject
-
cachedEffectiveTargetObject
private Object cachedEffectiveTargetObject
-
cachedArguments
private Parameter[] cachedArguments
-
cachedExceptions
private TypeCode[] cachedExceptions
-
cachedContexts
private java.lang.String[] cachedContexts
-
cachedOperationContext
private java.lang.String[] cachedOperationContext
-
cachedReceivedExceptionId
private java.lang.String cachedReceivedExceptionId
-
cachedResult
private Any cachedResult
-
cachedReceivedException
private Any cachedReceivedException
-
cachedEffectiveProfile
private TaggedProfile cachedEffectiveProfile
-
cachedRequestServiceContexts
private java.util.Map<java.lang.Integer,ServiceContext> cachedRequestServiceContexts
-
cachedReplyServiceContexts
private java.util.Map<java.lang.Integer,ServiceContext> cachedReplyServiceContexts
-
cachedEffectiveComponents
private java.util.Map<java.lang.Integer,TaggedComponent[]> cachedEffectiveComponents
-
piCurrentPushed
private boolean piCurrentPushed
-
MID_TARGET
private static final int MID_TARGET
- See Also:
- Constant Field Values
-
MID_EFFECTIVE_TARGET
private static final int MID_EFFECTIVE_TARGET
- See Also:
- Constant Field Values
-
MID_EFFECTIVE_PROFILE
private static final int MID_EFFECTIVE_PROFILE
- See Also:
- Constant Field Values
-
MID_RECEIVED_EXCEPTION
private static final int MID_RECEIVED_EXCEPTION
- See Also:
- Constant Field Values
-
MID_RECEIVED_EXCEPTION_ID
private static final int MID_RECEIVED_EXCEPTION_ID
- See Also:
- Constant Field Values
-
MID_GET_EFFECTIVE_COMPONENT
private static final int MID_GET_EFFECTIVE_COMPONENT
- See Also:
- Constant Field Values
-
MID_GET_EFFECTIVE_COMPONENTS
private static final int MID_GET_EFFECTIVE_COMPONENTS
- See Also:
- Constant Field Values
-
MID_GET_REQUEST_POLICY
private static final int MID_GET_REQUEST_POLICY
- See Also:
- Constant Field Values
-
MID_ADD_REQUEST_SERVICE_CONTEXT
private static final int MID_ADD_REQUEST_SERVICE_CONTEXT
- See Also:
- Constant Field Values
-
validCall
private static final boolean[][] validCall
-
-
Constructor Detail
-
ClientRequestInfoImpl
protected ClientRequestInfoImpl(ORB myORB)
Creates a new ClientRequestInfo implementation. The constructor is package scope since no other package need create an instance of this class.- Parameters:
myORB
- ORB to use
-
-
Method Detail
-
reset
void reset()
Reset the info object so that it can be reused for a retry, for example.- Overrides:
reset
in classRequestInfoImpl
-
target
public Object target()
The object which the client called to perform the operation.- Specified by:
target
in interfaceClientRequestInfoOperations
- Returns:
- the target object
- See Also:
ClientRequestInfoOperations.effective_target()
-
effective_target
public Object effective_target()
The actual object on which the operation will be invoked. If the reply_status is LOCATION_FORWARD, then on subsequent requests, effective_target will contain the forwarded IOR while target will remain unchanged.- Specified by:
effective_target
in interfaceClientRequestInfoOperations
- Returns:
- the object on which the operation will be invoked
- See Also:
ClientRequestInfoOperations.target()
-
effective_profile
public TaggedProfile effective_profile()
The profile that will be used to send the request. If a location forward has occurred for this operation's object and that object's profile change accordingly, then this profile will be that located profile.- Specified by:
effective_profile
in interfaceClientRequestInfoOperations
- Returns:
- the profile used
-
received_exception
public Any received_exception()
Contains the exception to be returned to the client.- Specified by:
received_exception
in interfaceClientRequestInfoOperations
- Returns:
- the returned exception
- See Also:
ClientRequestInfoOperations.received_exception_id()
-
received_exception_id
public java.lang.String received_exception_id()
The CORBA::RepositoryId of the exception to be returned to the client.- Specified by:
received_exception_id
in interfaceClientRequestInfoOperations
- Returns:
- the repository id of the returned exception
- See Also:
ClientRequestInfoOperations.received_exception()
,PortableInterceptor
package comments for limitations / unimplemented features
-
get_effective_component
public TaggedComponent get_effective_component(int id)
Returns the IOP::TaggedComponent with the given ID from the profile selected for this request. IF there is more than one component for a given component ID, it is undefined which component this operation returns (get_effective_component should be called instead).- Specified by:
get_effective_component
in interfaceClientRequestInfoOperations
- Parameters:
id
- The component id of the component which is to be returned.- Returns:
- The
IOP.TaggedComponent
obtained with the given identifier. - See Also:
ClientRequestInfoOperations.get_effective_components(int)
-
get_effective_components
public TaggedComponent[] get_effective_components(int id)
Returns all the tagged components with the given ID from the profile selected for this request.- Specified by:
get_effective_components
in interfaceClientRequestInfoOperations
- Parameters:
id
- The component id of the components which are to be returned.- Returns:
- An array of
TaggedComponent
objects, each of which contains the given identifier. - See Also:
ClientRequestInfoOperations.get_effective_component(int)
-
get_request_policy
public Policy get_request_policy(int type)
Returns the given policy in effect for this operation.- Specified by:
get_request_policy
in interfaceClientRequestInfoOperations
- Parameters:
type
- The policy type which specifies the policy to be returned.- Returns:
- The
CORBA.Policy
obtained with the given type. - See Also:
-
PortableInterceptor
package comments for limitations / unimplemented features
-
add_request_service_context
public void add_request_service_context(ServiceContext service_context, boolean replace)
Allows interceptors to add service contexts to the request.There is no declaration of the order of the service contexts. They may or may not appear in the order they are added.
- Specified by:
add_request_service_context
in interfaceClientRequestInfoOperations
- Parameters:
service_context
- TheIOP.ServiceContext
to be added to the request.replace
- Indicates the behavior of this operation when a service context already exists with the given ID. If false, thenBAD_INV_ORDER
with a standard minor code of 15 is thrown. If true, then the existing service context is replaced by the new one.
-
request_id
public int request_id()
See RequestInfoImpl for javadoc.- Specified by:
request_id
in interfaceRequestInfoOperations
- Specified by:
request_id
in classRequestInfoImpl
- Returns:
- unique request identifier
-
operation
public java.lang.String operation()
See RequestInfoImpl for javadoc.- Specified by:
operation
in interfaceRequestInfoOperations
- Specified by:
operation
in classRequestInfoImpl
- Returns:
- The name of the operation being invoked.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
arguments
public Parameter[] arguments()
See RequestInfoImpl for javadoc.- Specified by:
arguments
in interfaceRequestInfoOperations
- Specified by:
arguments
in classRequestInfoImpl
- Returns:
- array of arguments
- See Also:
-
PortableInterceptor
package comments for limitations / unimplemented features
-
exceptions
public TypeCode[] exceptions()
See RequestInfoImpl for javadoc.- Specified by:
exceptions
in interfaceRequestInfoOperations
- Specified by:
exceptions
in classRequestInfoImpl
- Returns:
- array of raised exceptions
- See Also:
-
PortableInterceptor
package comments for limitations / unimplemented features
-
contexts
public java.lang.String[] contexts()
See RequestInfoImpl for javadoc.- Specified by:
contexts
in interfaceRequestInfoOperations
- Specified by:
contexts
in classRequestInfoImpl
- Returns:
- array of contexts
- See Also:
-
PortableInterceptor
package comments for limitations / unimplemented features
-
operation_context
public java.lang.String[] operation_context()
See RequestInfoImpl for javadoc.- Specified by:
operation_context
in interfaceRequestInfoOperations
- Specified by:
operation_context
in classRequestInfoImpl
- Returns:
- array of operation contexts
- See Also:
-
PortableInterceptor
package comments for limitations / unimplemented features
-
result
public Any result()
See RequestInfoImpl for javadoc.- Specified by:
result
in interfaceRequestInfoOperations
- Specified by:
result
in classRequestInfoImpl
- Returns:
- the result from the invoked operation
- See Also:
-
PortableInterceptor
package comments for limitations / unimplemented features
-
response_expected
public boolean response_expected()
See RequestInfoImpl for javadoc.- Specified by:
response_expected
in interfaceRequestInfoOperations
- Specified by:
response_expected
in classRequestInfoImpl
- Returns:
- if a response is expected
-
forward_reference
public Object forward_reference()
See RequestInfoImpl for javadoc.- Specified by:
forward_reference
in interfaceRequestInfoOperations
- Specified by:
forward_reference
in classRequestInfoImpl
- Returns:
- object to which attribute is forwarded.
-
getLocatedIOR
private IOR getLocatedIOR()
-
setLocatedIOR
public void setLocatedIOR(IOR ior)
-
get_request_service_context
public ServiceContext get_request_service_context(int id)
See RequestInfoImpl for javadoc.- Specified by:
get_request_service_context
in interfaceRequestInfoOperations
- Specified by:
get_request_service_context
in classRequestInfoImpl
- Parameters:
id
- ID of the service context- Returns:
- A copy of the service context
-
get_reply_service_context
public ServiceContext get_reply_service_context(int id)
does not contain an etry for that ID, BAD_PARAM with a minor code of TBD_BP is raised.- Specified by:
get_reply_service_context
in interfaceRequestInfoOperations
- Specified by:
get_reply_service_context
in classRequestInfoImpl
- Parameters:
id
- ID of the service context- Returns:
- A copy of the Service Context
-
connection
public Connection connection()
- Specified by:
connection
in interfaceRequestInfoExt
- Overrides:
connection
in classRequestInfoImpl
- Returns:
- The connection on which the request is made. Note: we store the connection as an internal type but expose it here as an external type.
-
setInfo
protected void setInfo(MessageMediator messageMediator)
-
setRetryRequest
void setRetryRequest(RetryType retryRequest)
Set or reset the retry request flag.
-
getRetryRequest
RetryType getRetryRequest()
Retrieve the current retry request status.
-
incrementEntryCount
void incrementEntryCount()
Increases the entry count by 1.
-
entryCount
@InfoMethod private void entryCount(int count)
-
decrementEntryCount
void decrementEntryCount()
Decreases the entry count by 1.
-
getEntryCount
int getEntryCount()
Retrieve the current entry count
-
setReplyStatus
protected void setReplyStatus(short replyStatus)
Overridden from RequestInfoImpl. Calls the super class, then sets the ending point call depending on the reply status.- Overrides:
setReplyStatus
in classRequestInfoImpl
- Parameters:
replyStatus
- The value of the reply status
-
getReplyStatus
protected short getReplyStatus()
Description copied from class:RequestInfoImpl
Gets the current reply_status without doing an access check (available only to package and subclasses)- Overrides:
getReplyStatus
in classRequestInfoImpl
- Returns:
- Current reply status
-
setDIIRequest
protected void setDIIRequest(Request req)
Sets DII request object in the RequestInfoObject.- Parameters:
req
- The DII request object
-
setDIIInitiate
protected void setDIIInitiate(boolean diiInitiate)
Keeps track of whether initiate was called for a DII request. The ORB needs to know this so it knows whether to ignore a second call to initiateClientPIRequest or not.- Parameters:
diiInitiate
- If initiate was called
-
isDIIInitiate
protected boolean isDIIInitiate()
- Returns:
- If initiate was called for a DII request
- See Also:
setDIIInitiate(boolean)
-
setPICurrentPushed
protected void setPICurrentPushed(boolean piCurrentPushed)
The PICurrent stack should only be popped if it was pushed. This is generally the case. But exceptions which occur after the stub's entry to _request but before the push end up in _releaseReply which will try to pop unless told not to.- Parameters:
piCurrentPushed
- If the stack should be pushed
-
isPICurrentPushed
protected boolean isPICurrentPushed()
-
setException
protected void setException(java.lang.Exception exception)
Overridden from RequestInfoImpl.- Overrides:
setException
in classRequestInfoImpl
- Parameters:
exception
- exception to be returned
-
getIsOneWay
protected boolean getIsOneWay()
-
checkAccess
protected void checkAccess(int methodID) throws BAD_INV_ORDER
See description for RequestInfoImpl.checkAccess- Specified by:
checkAccess
in classRequestInfoImpl
- Parameters:
methodID
- The ID of this method, one of the MID_* constants. This allows us to easily look up the method access in a table. Note that method ids may overlap between subclasses.- Throws:
BAD_INV_ORDER
-
-