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 TaggedProfileprivate Objectprivate TypeCode[]private String[]private Anyprivate Stringprivate Map<Integer, ServiceContext> private Map<Integer, ServiceContext> private Anyprivate 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 intprivate booleanprivate intprivate MessageMediatorprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate booleanprivate Requestprivate RetryType///////////////////////////////////////////////////////////////////private static final boolean[][]Fields inherited from class 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
ConstructorsModifierConstructorDescriptionprotectedClientRequestInfoImpl(ORB myORB) Creates a new ClientRequestInfo implementation. -
Method Summary
Modifier and TypeMethodDescriptionvoidadd_request_service_context(ServiceContext service_context, boolean replace) Allows interceptors to add service contexts to the request.See RequestInfoImpl for javadoc.protected voidcheckAccess(int methodID) See description for RequestInfoImpl.checkAccessString[]contexts()See RequestInfoImpl for javadoc.(package private) voidDecreases 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 voidentryCount(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) intRetrieve the current entry countprotected booleanprivate IORprotected shortGets the current reply_status without doing an access check (available only to package and subclasses)(package private) RetryTypeRetrieve the current retry request status.(package private) voidIncreases the entry count by 1.protected booleanprotected booleanSee 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.intSee RequestInfoImpl for javadoc.(package private) voidreset()Reset the info object so that it can be reused for a retry, for example.booleanSee RequestInfoImpl for javadoc.result()See RequestInfoImpl for javadoc.protected voidsetDIIInitiate(boolean diiInitiate) Keeps track of whether initiate was called for a DII request.protected voidsetDIIRequest(Request req) Sets DII request object in the RequestInfoObject.protected voidsetException(Exception exception) Overridden from RequestInfoImpl.protected voidsetInfo(MessageMediator messageMediator) voidsetLocatedIOR(IOR ior) protected voidsetPICurrentPushed(boolean piCurrentPushed) The PICurrent stack should only be popped if it was pushed.protected voidsetReplyStatus(short replyStatus) Overridden from RequestInfoImpl.(package private) voidsetRetryRequest(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 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_scopeMethods inherited from class 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_connectionMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface 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_overrideMethods inherited from interface 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:
resetin classRequestInfoImpl
-
target
The object which the client called to perform the operation.- Specified by:
targetin 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_targetin 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_profilein interfaceClientRequestInfoOperations- Returns:
- the profile used
-
received_exception
Contains the exception to be returned to the client.- Specified by:
received_exceptionin 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_idin 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_componentin interfaceClientRequestInfoOperations- Parameters:
id- The component id of the component which is to be returned.- Returns:
- The
IOP.TaggedComponentobtained 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_componentsin interfaceClientRequestInfoOperations- Parameters:
id- The component id of the components which are to be returned.- Returns:
- An array of
TaggedComponentobjects, 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_policyin interfaceClientRequestInfoOperations- Parameters:
type- The policy type which specifies the policy to be returned.- Returns:
- The
CORBA.Policyobtained 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_contextin interfaceClientRequestInfoOperations- Parameters:
service_context- TheIOP.ServiceContextto 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_ORDERwith 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_idin interfaceRequestInfoOperations- Specified by:
request_idin classRequestInfoImpl- Returns:
- unique request identifier
-
operation
See RequestInfoImpl for javadoc.- Specified by:
operationin interfaceRequestInfoOperations- Specified by:
operationin classRequestInfoImpl- Returns:
- The name of the operation being invoked.
-
toString
-
arguments
See RequestInfoImpl for javadoc.- Specified by:
argumentsin interfaceRequestInfoOperations- Specified by:
argumentsin classRequestInfoImpl- Returns:
- array of arguments
- See Also:
-
exceptions
See RequestInfoImpl for javadoc.- Specified by:
exceptionsin interfaceRequestInfoOperations- Specified by:
exceptionsin classRequestInfoImpl- Returns:
- array of raised exceptions
- See Also:
-
contexts
See RequestInfoImpl for javadoc.- Specified by:
contextsin interfaceRequestInfoOperations- Specified by:
contextsin classRequestInfoImpl- Returns:
- array of contexts
- See Also:
-
operation_context
See RequestInfoImpl for javadoc.- Specified by:
operation_contextin interfaceRequestInfoOperations- Specified by:
operation_contextin classRequestInfoImpl- Returns:
- array of operation contexts
- See Also:
-
result
See RequestInfoImpl for javadoc.- Specified by:
resultin interfaceRequestInfoOperations- Specified by:
resultin classRequestInfoImpl- Returns:
- the result from the invoked operation
- See Also:
-
response_expected
public boolean response_expected()See RequestInfoImpl for javadoc.- Specified by:
response_expectedin interfaceRequestInfoOperations- Specified by:
response_expectedin classRequestInfoImpl- Returns:
- if a response is expected
-
forward_reference
See RequestInfoImpl for javadoc.- Specified by:
forward_referencein interfaceRequestInfoOperations- Specified by:
forward_referencein classRequestInfoImpl- Returns:
- object to which attribute is forwarded.
-
getLocatedIOR
-
setLocatedIOR
-
get_request_service_context
See RequestInfoImpl for javadoc.- Specified by:
get_request_service_contextin interfaceRequestInfoOperations- Specified by:
get_request_service_contextin 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_contextin interfaceRequestInfoOperations- Specified by:
get_reply_service_contextin classRequestInfoImpl- Parameters:
id- ID of the service context- Returns:
- A copy of the Service Context
-
connection
- Specified by:
connectionin interfaceRequestInfoExt- Overrides:
connectionin 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:
setReplyStatusin classRequestInfoImpl- Parameters:
replyStatus- The value of the reply status
-
getReplyStatus
protected short getReplyStatus()Description copied from class:RequestInfoImplGets the current reply_status without doing an access check (available only to package and subclasses)- Overrides:
getReplyStatusin 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:
setExceptionin classRequestInfoImpl- Parameters:
exception- exception to be returned
-
getIsOneWay
protected boolean getIsOneWay() -
checkAccess
See description for RequestInfoImpl.checkAccess- Specified by:
checkAccessin 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
-