FileDocCategorySizeDatePackage
Object.javaAPI DocJava SE 5 API10648Fri Aug 26 14:58:30 BST 2005org.omg.CORBA

Object

public interface Object
The definition for a CORBA object reference.

A CORBA object reference is a handle for a particular CORBA object implemented by a server. A CORBA object reference identifies the same CORBA object each time the reference is used to invoke a method on the object. A CORBA object may have multiple, distinct object references.

The org.omg.CORBA.Object interface is the root of the inheritance hierarchy for all CORBA object references in the Java programming language, analogous to java.rmi.Remote for RMI remote objects.

A CORBA object may be either local or remote. If it is a local object (that is, running in the same VM as the client), invocations may be directly serviced by the object instance, and the object reference could point to the actual instance of the object implementation class. If a CORBA object is a remote object (that is, running in a different VM from the client), the object reference points to a stub (proxy) which uses the ORB machinery to make a remote invocation on the server where the object implementation resides.

Default implementations of the methods in the interface org.omg.CORBA.Object are provided in the class org.omg.CORBA.portable.ObjectImpl, which is the base class for stubs and object implementations.

see
org.omg.CORBA.portable.ObjectImpl

Fields Summary
Constructors Summary
Methods Summary
public Request_create_request(Context ctx, java.lang.String operation, NVList arg_list, NamedValue result, ExceptionList exclist, ContextList ctxlist)
Creates a Request instance initialized with the given context, method name, list of arguments, container for the method's return value, list of possible exceptions, and list of context strings needing to be resolved.

param
ctx a Context object containing a list of properties
param
operation the name of the method to be invoked
param
arg_list an NVList containing the actual arguments to the method being invoked
param
result a NamedValue object to serve as a container for the method's return value
param
exclist an ExceptionList object containing a list of possible exceptions the method can throw
param
ctxlist a ContextList object containing a list of context strings that need to be resolved and sent with the Request instance
return
the newly-created Request object
see
Request
see
NVList
see
NamedValue
see
ExceptionList
see
ContextList

public Request_create_request(Context ctx, java.lang.String operation, NVList arg_list, NamedValue result)
Creates a Request instance initialized with the given context, method name, list of arguments, and container for the method's return value.

param
ctx a Context object containing a list of properties
param
operation the name of the method to be invoked
param
arg_list an NVList containing the actual arguments to the method being invoked
param
result a NamedValue object to serve as a container for the method's return value
return
the newly-created Request object
see
Request
see
NVList
see
NamedValue

public org.omg.CORBA.Object_duplicate()
Returns a duplicate of this CORBA object reference. The server object implementation is not involved in creating the duplicate, and the implementation cannot distinguish whether the original object reference or a duplicate was used to make a request.

Note that this method is not very useful in the Java platform, since memory management is handled by the VM. It is included for compliance with the CORBA APIs.

The method _duplicate may return this object reference itself.

return
a duplicate of this object reference or this object reference itself

public DomainManager[]_get_domain_managers()
Retrieves the DomainManagers of this object. This allows administration services (and applications) to retrieve the domain managers, and hence the security and other policies applicable to individual objects that are members of the domain.

return
the list of immediately enclosing domain managers of this object. At least one domain manager is always returned in the list since by default each object is associated with at least one domain manager at creation.

public org.omg.CORBA.Object_get_interface_def()
Obtains an InterfaceDef for the object implementation referenced by this object reference. The InterfaceDef object may be used to introspect on the methods, attributes, and other type information for the object referred to by this object reference.

return
the InterfaceDef object in the Interface Repository which provides type information about the object referred to by this object reference

public Policy_get_policy(int policy_type)
Returns the Policy object of the specified type which applies to this object.

param
policy_type the type of policy to be obtained
return
A Policy object of the type specified by the policy_type parameter
exception
org.omg.CORBA.BAD_PARAM when the value of policy type is not valid either because the specified type is not supported by this ORB or because a policy object of that type is not associated with this Object

public int_hash(int maximum)
Returns an ORB-internal identifier for this object reference. This is a hash identifier, which does not change during the lifetime of the object reference, and so neither will any hash function of that identifier change. The value returned is not guaranteed to be unique; in other words, another object reference may have the same hash value. If two object references hash differently, then they are distinct object references; however, both may still refer to the same CORBA object.

param
maximum the upper bound on the hash value returned by the ORB
return
the ORB-internal hash identifier for this object reference

public boolean_is_a(java.lang.String repositoryIdentifier)
Checks whether this object is an instance of a class that implements the given interface.

param
repositoryIdentifier the interface to check against
return
true if this object reference is an instance of a class that implements the interface; false otherwise

public boolean_is_equivalent(org.omg.CORBA.Object other)
Determines whether the two object references are equivalent, so far as the ORB can easily determine. Two object references are equivalent if they are identical. Two distinct object references which in fact refer to the same object are also equivalent. However, ORBs are not required to attempt determination of whether two distinct object references refer to the same object, since such determination could be impractically expensive.

param
other the other object reference with which to check for equivalence
return
true if this object reference is known to be equivalent to the given object reference. Note that false indicates only that the two object references are distinct, not necessarily that they reference distinct objects.

public boolean_non_existent()
Determines whether the server object for this object reference has been destroyed.

return
true if the ORB knows authoritatively that the server object does not exist; false otherwise

public void_release()
Signals that the caller is done using this object reference, so internal ORB resources associated with this object reference can be released. Note that the object implementation is not involved in this operation, and other references to the same object are not affected.

public Request_request(java.lang.String operation)
Creates a Request instance for use in the Dynamic Invocation Interface.

param
operation the name of the method to be invoked using the Request instance
return
the newly-created Request instance

public org.omg.CORBA.Object_set_policy_override(Policy[] policies, SetOverrideType set_add)
Returns a new Object with the given policies either replacing any existing policies in this Object or with the given policies added to the existing ones, depending on the value of the given SetOverrideType object.

param
policies an array of Policy objects containing the policies to be added or to be used as replacements
param
set_add either SetOverrideType.SET_OVERRIDE, indicating that the given policies will replace any existing ones, or SetOverrideType.ADD_OVERRIDE, indicating that the given policies should be added to any existing ones
return
a new Object with the given policies replacing or added to those in this Object