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 protectedClientRequestInfoImpl(ORB myORB)Creates a new ClientRequestInfo implementation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd_request_service_context(ServiceContext service_context, boolean replace)Allows interceptors to add service contexts to the request.Parameter[]arguments()See RequestInfoImpl for javadoc.protected voidcheckAccess(int methodID)See description for RequestInfoImpl.checkAccessConnectionconnection()java.lang.String[]contexts()See RequestInfoImpl for javadoc.(package private) voiddecrementEntryCount()Decreases the entry count by 1.TaggedProfileeffective_profile()The profile that will be used to send the request.Objecteffective_target()The actual object on which the operation will be invoked.private voidentryCount(int count)TypeCode[]exceptions()See RequestInfoImpl for javadoc.Objectforward_reference()See RequestInfoImpl for javadoc.TaggedComponentget_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.ServiceContextget_reply_service_context(int id)does not contain an etry for that ID, BAD_PARAM with a minor code of TBD_BP is raised.Policyget_request_policy(int type)Returns the given policy in effect for this operation.ServiceContextget_request_service_context(int id)See RequestInfoImpl for javadoc.(package private) intgetEntryCount()Retrieve the current entry countprotected booleangetIsOneWay()private IORgetLocatedIOR()protected shortgetReplyStatus()Gets the current reply_status without doing an access check (available only to package and subclasses)(package private) RetryTypegetRetryRequest()Retrieve the current retry request status.(package private) voidincrementEntryCount()Increases the entry count by 1.protected booleanisDIIInitiate()protected booleanisPICurrentPushed()java.lang.Stringoperation()See RequestInfoImpl for javadoc.java.lang.String[]operation_context()See RequestInfoImpl for javadoc.Anyreceived_exception()Contains the exception to be returned to the client.java.lang.Stringreceived_exception_id()The CORBA::RepositoryId of the exception to be returned to the client.intrequest_id()See RequestInfoImpl for javadoc.(package private) voidreset()Reset the info object so that it can be reused for a retry, for example.booleanresponse_expected()See RequestInfoImpl for javadoc.Anyresult()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(java.lang.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.Objecttarget()The object which the client called to perform the operation.java.lang.StringtoString()-
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:
resetin classRequestInfoImpl
-
target
public Object target()
The object which the client called to perform the operation.- Specified by:
targetin 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_targetin 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_profilein interfaceClientRequestInfoOperations- Returns:
- the profile used
-
received_exception
public Any received_exception()
Contains the exception to be returned to the client.- Specified by:
received_exceptionin 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_idin interfaceClientRequestInfoOperations- Returns:
- the repository id of the returned exception
- See Also:
ClientRequestInfoOperations.received_exception(),PortableInterceptorpackage 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_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:
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_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:
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_policyin interfaceClientRequestInfoOperations- Parameters:
type- The policy type which specifies the policy to be returned.- Returns:
- The
CORBA.Policyobtained with the given type. - See Also:
-
PortableInterceptorpackage 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_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
public java.lang.String operation()
See RequestInfoImpl for javadoc.- Specified by:
operationin interfaceRequestInfoOperations- Specified by:
operationin classRequestInfoImpl- Returns:
- The name of the operation being invoked.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
arguments
public Parameter[] arguments()
See RequestInfoImpl for javadoc.- Specified by:
argumentsin interfaceRequestInfoOperations- Specified by:
argumentsin classRequestInfoImpl- Returns:
- array of arguments
- See Also:
-
PortableInterceptorpackage comments for limitations / unimplemented features
-
exceptions
public TypeCode[] exceptions()
See RequestInfoImpl for javadoc.- Specified by:
exceptionsin interfaceRequestInfoOperations- Specified by:
exceptionsin classRequestInfoImpl- Returns:
- array of raised exceptions
- See Also:
-
PortableInterceptorpackage comments for limitations / unimplemented features
-
contexts
public java.lang.String[] contexts()
See RequestInfoImpl for javadoc.- Specified by:
contextsin interfaceRequestInfoOperations- Specified by:
contextsin classRequestInfoImpl- Returns:
- array of contexts
- See Also:
-
PortableInterceptorpackage comments for limitations / unimplemented features
-
operation_context
public java.lang.String[] operation_context()
See RequestInfoImpl for javadoc.- Specified by:
operation_contextin interfaceRequestInfoOperations- Specified by:
operation_contextin classRequestInfoImpl- Returns:
- array of operation contexts
- See Also:
-
PortableInterceptorpackage comments for limitations / unimplemented features
-
result
public Any result()
See RequestInfoImpl for javadoc.- Specified by:
resultin interfaceRequestInfoOperations- Specified by:
resultin classRequestInfoImpl- Returns:
- the result from the invoked operation
- See Also:
-
PortableInterceptorpackage comments for limitations / unimplemented features
-
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
public Object forward_reference()
See RequestInfoImpl for javadoc.- Specified by:
forward_referencein interfaceRequestInfoOperations- Specified by:
forward_referencein 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_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
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_contextin interfaceRequestInfoOperations- Specified by:
get_reply_service_contextin classRequestInfoImpl- Parameters:
id- ID of the service context- Returns:
- A copy of the Service Context
-
connection
public Connection 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
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:
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
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:
setExceptionin classRequestInfoImpl- Parameters:
exception- exception to be returned
-
getIsOneWay
protected boolean getIsOneWay()
-
checkAccess
protected void checkAccess(int methodID) throws BAD_INV_ORDERSee 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
-
-