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
,Serializable
,Object
,IDLEntity
,ClientRequestInfo
,ClientRequestInfoOperations
,RequestInfo
,RequestInfoOperations
Implementation of the ClientRequestInfo interface as specified in
orbos/99-12-02 section 5.4.2.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Parameter[]
private String[]
private Map
<Integer, TaggedComponent[]> private TaggedProfile
private Object
private TypeCode[]
private String[]
private Any
private String
private Map
<Integer, ServiceContext> private Map
<Integer, ServiceContext> private Any
private Object
(package private) static final int
(package private) static final int
(package private) static final int
(package private) static final int
(package private) static final int
private boolean
private int
private MessageMediator
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private boolean
private Request
private RetryType
private static final boolean[][]
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
ConstructorsModifierConstructorDescriptionprotected
ClientRequestInfoImpl
(ORB myORB) Creates a new ClientRequestInfo implementation. -
Method Summary
Modifier and TypeMethodDescriptionvoid
add_request_service_context
(ServiceContext service_context, boolean replace) Allows interceptors to add service contexts to the request.See RequestInfoImpl for javadoc.protected void
checkAccess
(int methodID) See description for RequestInfoImpl.checkAccessString[]
contexts()
See RequestInfoImpl for javadoc.(package private) void
Decreases the entry count by 1.The profile that will be used to send the request.The actual object on which the operation will be invoked.private void
entryCount
(int count) TypeCode[]
See RequestInfoImpl for javadoc.See RequestInfoImpl for javadoc.get_effective_component
(int id) Returns the IOP::TaggedComponent with the given ID from the profile selected for this request.get_effective_components
(int id) Returns all the tagged components with the given ID from the profile selected for this request.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.get_request_policy
(int type) Returns the given policy in effect for this operation.get_request_service_context
(int id) See RequestInfoImpl for javadoc.(package private) int
Retrieve the current entry countprotected boolean
private IOR
protected short
Gets the current reply_status without doing an access check (available only to package and subclasses)(package private) RetryType
Retrieve the current retry request status.(package private) void
Increases the entry count by 1.protected boolean
protected boolean
See RequestInfoImpl for javadoc.String[]
See RequestInfoImpl for javadoc.Contains the exception to be returned to the client.The CORBA::RepositoryId of the exception to be returned to the client.int
See RequestInfoImpl for javadoc.(package private) void
reset()
Reset the info object so that it can be reused for a retry, for example.boolean
See RequestInfoImpl for javadoc.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
(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.target()
The object which the client called to perform the operation.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 Details
-
CALL_SEND_REQUEST
static final int CALL_SEND_REQUEST- See Also:
-
CALL_SEND_POLL
static final int CALL_SEND_POLL- See Also:
-
CALL_RECEIVE_REPLY
static final int CALL_RECEIVE_REPLY- See Also:
-
CALL_RECEIVE_EXCEPTION
static final int CALL_RECEIVE_EXCEPTION- See Also:
-
CALL_RECEIVE_OTHER
static final int CALL_RECEIVE_OTHER- See Also:
-
retryRequest
-
entryCount
private int entryCount -
request
-
diiInitiate
private boolean diiInitiate -
messageMediator
-
cachedTargetObject
-
cachedEffectiveTargetObject
-
cachedArguments
-
cachedExceptions
-
cachedContexts
-
cachedOperationContext
-
cachedReceivedExceptionId
-
cachedResult
-
cachedReceivedException
-
cachedEffectiveProfile
-
cachedRequestServiceContexts
-
cachedReplyServiceContexts
-
cachedEffectiveComponents
-
piCurrentPushed
private boolean piCurrentPushed -
MID_TARGET
private static final int MID_TARGET- See Also:
-
MID_EFFECTIVE_TARGET
private static final int MID_EFFECTIVE_TARGET- See Also:
-
MID_EFFECTIVE_PROFILE
private static final int MID_EFFECTIVE_PROFILE- See Also:
-
MID_RECEIVED_EXCEPTION
private static final int MID_RECEIVED_EXCEPTION- See Also:
-
MID_RECEIVED_EXCEPTION_ID
private static final int MID_RECEIVED_EXCEPTION_ID- See Also:
-
MID_GET_EFFECTIVE_COMPONENT
private static final int MID_GET_EFFECTIVE_COMPONENT- See Also:
-
MID_GET_EFFECTIVE_COMPONENTS
private static final int MID_GET_EFFECTIVE_COMPONENTS- See Also:
-
MID_GET_REQUEST_POLICY
private static final int MID_GET_REQUEST_POLICY- See Also:
-
MID_ADD_REQUEST_SERVICE_CONTEXT
private static final int MID_ADD_REQUEST_SERVICE_CONTEXT- See Also:
-
validCall
private static final boolean[][] validCall
-
-
Constructor Details
-
ClientRequestInfoImpl
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 Details
-
reset
void reset()Reset the info object so that it can be reused for a retry, for example.- Overrides:
reset
in classRequestInfoImpl
-
target
The object which the client called to perform the operation.- Specified by:
target
in interfaceClientRequestInfoOperations
- Returns:
- the target object
- See Also:
-
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:
-
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
Contains the exception to be returned to the client.- Specified by:
received_exception
in interfaceClientRequestInfoOperations
- Returns:
- the returned exception
- See Also:
-
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:
-
get_effective_component
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:
-
get_effective_components
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:
-
get_request_policy
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:
-
add_request_service_context
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
See RequestInfoImpl for javadoc.- Specified by:
operation
in interfaceRequestInfoOperations
- Specified by:
operation
in classRequestInfoImpl
- Returns:
- The name of the operation being invoked.
-
toString
-
arguments
See RequestInfoImpl for javadoc.- Specified by:
arguments
in interfaceRequestInfoOperations
- Specified by:
arguments
in classRequestInfoImpl
- Returns:
- array of arguments
- See Also:
-
exceptions
See RequestInfoImpl for javadoc.- Specified by:
exceptions
in interfaceRequestInfoOperations
- Specified by:
exceptions
in classRequestInfoImpl
- Returns:
- array of raised exceptions
- See Also:
-
contexts
See RequestInfoImpl for javadoc.- Specified by:
contexts
in interfaceRequestInfoOperations
- Specified by:
contexts
in classRequestInfoImpl
- Returns:
- array of contexts
- See Also:
-
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:
-
result
See RequestInfoImpl for javadoc.- Specified by:
result
in interfaceRequestInfoOperations
- Specified by:
result
in classRequestInfoImpl
- Returns:
- the result from the invoked operation
- See Also:
-
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
See RequestInfoImpl for javadoc.- Specified by:
forward_reference
in interfaceRequestInfoOperations
- Specified by:
forward_reference
in classRequestInfoImpl
- Returns:
- object to which attribute is forwarded.
-
getLocatedIOR
-
setLocatedIOR
-
get_request_service_context
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
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
- 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
-
setRetryRequest
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
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:
-
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
Overridden from RequestInfoImpl.- Overrides:
setException
in classRequestInfoImpl
- Parameters:
exception
- exception to be returned
-
getIsOneWay
protected boolean getIsOneWay() -
checkAccess
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
-