Class IORInfoImpl
- java.lang.Object
-
- org.omg.CORBA.LocalObject
-
- com.sun.corba.ee.impl.interceptors.IORInfoImpl
-
- All Implemented Interfaces:
IORInfoExt
,java.io.Serializable
,Object
,IDLEntity
,IORInfo
,IORInfoOperations
public final class IORInfoImpl extends LocalObject implements IORInfo, IORInfoExt
IORInfoImpl is the implementation of the IORInfo class, as described in orbos/99-12-02, section 7.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private ObjectAdapter
adapter
private static OMGSystemException
omgWrapper
private ORB
orb
private static ORBUtilSystemException
orbutilWrapper
private int
state
private static int
STATE_DONE
private static int
STATE_ESTABLISHED
private static int
STATE_INITIAL
private static InterceptorsSystemException
wrapper
-
Constructor Summary
Constructors Constructor Description IORInfoImpl(ObjectAdapter adapter)
Creates a new IORInfo implementation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectReferenceTemplate
adapter_template()
Return the object reference template of the object adapter that was just created and is running IOR interceptors.void
add_ior_component(TaggedComponent tagged_component)
A portable ORB service implementation calls this method from its implementation of establish_components to add a tagged component to the set which will be included when constructing IORs.void
add_ior_component_to_profile(TaggedComponent tagged_component, int profile_id)
A portable ORB service implementation calls this method from its implementation of establish_components to add a tagged component to the set which will be included when constructing IORs.private void
addIORComponentToProfileInternal(TaggedComponent tagged_component, java.util.Iterator iterator)
Internal utility method to add an IOR component to the set of profiles present in the iterator.private void
checkState(int expectedState)
private void
checkState(int expectedState1, int expectedState2)
ObjectReferenceFactory
current_factory()
On read, returns the current factory that will be used to create object references for the object adapter that was just created and is running IOR interceptors.void
current_factory(ObjectReferenceFactory factory)
On read, returns the current factory that will be used to create object references for the object adapter that was just created and is running IOR interceptors.Policy
get_effective_policy(int type)
An ORB service implementation may determine what server side policy of a particular type is in effect for an IOR being constructed by calling the get_effective_policy operation.ObjectAdapter
getObjectAdapter()
int
getServerPort(java.lang.String type)
(package private) void
makeStateDone()
(package private) void
makeStateEstablished()
int
manager_id()
Return the adapter manager id of the object adapter that was just created and is running IOR interceptors.private void
nullParam()
Called when an invalid null parameter was passed.short
state()
Return the adapter state of the object adapter that was just created and is running IOR interceptors.-
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, _orb, _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, toString, 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
-
-
-
-
Field Detail
-
STATE_INITIAL
private static final int STATE_INITIAL
- See Also:
- Constant Field Values
-
STATE_ESTABLISHED
private static final int STATE_ESTABLISHED
- See Also:
- Constant Field Values
-
STATE_DONE
private static final int STATE_DONE
- See Also:
- Constant Field Values
-
state
private int state
-
adapter
private transient ObjectAdapter adapter
-
orb
private transient ORB orb
-
orbutilWrapper
private static final ORBUtilSystemException orbutilWrapper
-
wrapper
private static final InterceptorsSystemException wrapper
-
omgWrapper
private static final OMGSystemException omgWrapper
-
-
Constructor Detail
-
IORInfoImpl
IORInfoImpl(ObjectAdapter adapter)
Creates a new IORInfo implementation. This info object will establish tagged components with the template for the provided IOR Template.
-
-
Method Detail
-
get_effective_policy
public Policy get_effective_policy(int type)
An ORB service implementation may determine what server side policy of a particular type is in effect for an IOR being constructed by calling the get_effective_policy operation. When the IOR being constructed is for an object implemented using a POA, all Policy objects passed to the PortableServer::POA::create_POA call that created that POA are accessible via get_effective_policy.If a policy for the given type is not known to the ORB, then this operation will raise INV_POLICY with a standard minor code of 2.
- Specified by:
get_effective_policy
in interfaceIORInfoOperations
- Parameters:
type
- The CORBA::PolicyType specifying the type of policy to return.- Returns:
- The effective CORBA::Policy object of the requested type. If the given policy type is known, but no policy of that type is in effect, then this operation will return a nil object reference.
-
add_ior_component
public void add_ior_component(TaggedComponent tagged_component)
A portable ORB service implementation calls this method from its implementation of establish_components to add a tagged component to the set which will be included when constructing IORs. The components in this set will be included in all profiles.Any number of components may exist with the same component ID.
- Specified by:
add_ior_component
in interfaceIORInfoOperations
- Parameters:
tagged_component
- The IOP::TaggedComponent to add
-
add_ior_component_to_profile
public void add_ior_component_to_profile(TaggedComponent tagged_component, int profile_id)
A portable ORB service implementation calls this method from its implementation of establish_components to add a tagged component to the set which will be included when constructing IORs. The components in this set will be included in the specified profile.Any number of components may exist with the same component ID.
If the given profile ID does not define a known profile or it is impossible to add components to thgat profile, BAD_PARAM is raised with a minor code of TBD_BP + 3.
- Specified by:
add_ior_component_to_profile
in interfaceIORInfoOperations
- Parameters:
tagged_component
- The IOP::TaggedComponent to add.profile_id
- The IOP::ProfileId tof the profile to which this component will be added.
-
getServerPort
public int getServerPort(java.lang.String type) throws UnknownType
- Specified by:
getServerPort
in interfaceIORInfoExt
- Parameters:
type
- The type of the server port (see connection.ORBSocketFactory for discussion).- Returns:
- The listen port number for that type.
- Throws:
UnknownType
- if no port of the given type is found.
-
getObjectAdapter
public ObjectAdapter getObjectAdapter()
- Specified by:
getObjectAdapter
in interfaceIORInfoExt
-
manager_id
public int manager_id()
Description copied from interface:IORInfoOperations
Return the adapter manager id of the object adapter that was just created and is running IOR interceptors.- Specified by:
manager_id
in interfaceIORInfoOperations
- Returns:
- the manager ID
-
state
public short state()
Description copied from interface:IORInfoOperations
Return the adapter state of the object adapter that was just created and is running IOR interceptors.- Specified by:
state
in interfaceIORInfoOperations
- Returns:
- the state of the adapter
-
adapter_template
public ObjectReferenceTemplate adapter_template()
Description copied from interface:IORInfoOperations
Return the object reference template of the object adapter that was just created and is running IOR interceptors.- Specified by:
adapter_template
in interfaceIORInfoOperations
- Returns:
- the template
-
current_factory
public ObjectReferenceFactory current_factory()
Description copied from interface:IORInfoOperations
On read, returns the current factory that will be used to create object references for the object adapter that was just created and is running IOR interceptors. By default, this factory is the same as the value of the adapter_template attribute. The current_factory may also be set to another object reference template inside an IORInterceptor_3_0.- Specified by:
current_factory
in interfaceIORInfoOperations
-
current_factory
public void current_factory(ObjectReferenceFactory factory)
Description copied from interface:IORInfoOperations
On read, returns the current factory that will be used to create object references for the object adapter that was just created and is running IOR interceptors. By default, this factory is the same as the value of the adapter_template attribute. The current_factory may also be set to another object reference template inside an IORInterceptor_3_0.- Specified by:
current_factory
in interfaceIORInfoOperations
-
addIORComponentToProfileInternal
private void addIORComponentToProfileInternal(TaggedComponent tagged_component, java.util.Iterator iterator)
Internal utility method to add an IOR component to the set of profiles present in the iterator.
-
nullParam
private void nullParam()
Called when an invalid null parameter was passed. Throws a BAD_PARAM with a minor code of 1
-
checkState
private void checkState(int expectedState)
-
checkState
private void checkState(int expectedState1, int expectedState2)
-
makeStateEstablished
void makeStateEstablished()
-
makeStateDone
void makeStateDone()
-
-