|
JavaTM 2 Platform Std. Ed. v1.3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.omg.CORBA.portable.ObjectImpl
The ObjectImpl class provides default implementations of the org.omg.CORBA.Object methods. All method implementations are forwarded to a Delegate object stored in the ObjectImpl instance. ObjectImpl is the common base class for all stub classes. ObjectImpl allows for portable stubs because the Delegate can be implemented by a different vendor-specific ORB.
Constructor Summary | |
ObjectImpl()
|
Method Summary | |
Request |
_create_request(Context ctx,
String operation,
NVList arg_list,
NamedValue result)
default implementation of the org.omg.CORBA.Object method. |
Request |
_create_request(Context ctx,
String operation,
NVList arg_list,
NamedValue result,
ExceptionList exceptions,
ContextList contexts)
default implementation of the org.omg.CORBA.Object method. |
Object |
_duplicate()
default implementation of the org.omg.CORBA.Object method. |
Delegate |
_get_delegate()
Provides a reference to the vendor-specific Delegate for this ObjectImpl. |
DomainManager[] |
_get_domain_managers()
Retrieves the DomainManagers of this object. |
Object |
_get_interface_def()
default implementation of the org.omg.CORBA.Object method. |
Policy |
_get_policy(int policy_type)
Returns the Policy object of the specified type
which applies to this object. |
int |
_hash(int maximum)
default implementation of the org.omg.CORBA.Object method. |
abstract String[] |
_ids()
Provides a string array containing the repository ids for this object. |
InputStream |
_invoke(OutputStream output)
_invoke is called to invoke an operation. |
boolean |
_is_a(String repository_id)
default implementation of the org.omg.CORBA.Object method. |
boolean |
_is_equivalent(Object that)
default implementation of the org.omg.CORBA.Object method. |
boolean |
_is_local()
Checks whether this object is process-local. |
boolean |
_non_existent()
default implementation of the org.omg.CORBA.Object method. |
ORB |
_orb()
Provides reference to the ORB associated with this object and its delegate. |
void |
_release()
default implementation of the org.omg.CORBA.Object method. |
void |
_releaseReply(InputStream input)
_releaseReply may optionally be called by a stub to release a reply stream back to the ORB when the unmarshaling has completed. |
Request |
_request(String operation)
default implementation of the org.omg.CORBA.Object method. |
OutputStream |
_request(String operation,
boolean responseExpected)
_request is called by a stub to obtain an OutputStream for marshaling arguments. |
void |
_servant_postinvoke(ServantObject servant)
Is invoked by the local stub after the operation has been invoked on the local servant. |
ServantObject |
_servant_preinvoke(String operation,
Class expectedType)
Returns a Java reference to the servant which should be used for this request. |
void |
_set_delegate(Delegate delegate)
Sets the Delegate contained in this ObjectImpl instance. |
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. |
boolean |
equals(Object obj)
Indicates whether some other object is "equal to" this one. |
int |
hashCode()
Returns a hash code value for the object. |
String |
toString()
Returns a string representation of the object. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ObjectImpl()
Method Detail |
public Delegate _get_delegate()
public void _set_delegate(Delegate delegate)
public abstract String[] _ids()
public Object _duplicate()
_duplicate
in interface Object
org.omg.CORBA.Object
public void _release()
_release
in interface Object
public boolean _is_a(String repository_id)
_is_a
in interface Object
org.omg.CORBA.Object
repositoryIdentifier
- the interface to check againsttrue
if this object reference is an instance
of a class that implements the interface;
false
otherwisepublic boolean _is_equivalent(Object that)
_is_equivalent
in interface Object
org.omg.CORBA.Object
other
- the other object reference with which to check for equivalencetrue
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()
_non_existent
in interface Object
org.omg.CORBA.Object
true
if the ORB knows authoritatively that the
server object does not exist; false
otherwisepublic int _hash(int maximum)
_hash
in interface Object
org.omg.CORBA.Object
maximum
- the upper bound on the hash value returned by the ORBpublic Request _request(String operation)
_request
in interface Object
org.omg.CORBA.Object
operation
- the name of the method to be invoked using the
Request
instanceRequest
instancepublic Request _create_request(Context ctx, String operation, NVList arg_list, NamedValue result)
_create_request
in interface Object
org.omg.CORBA.Object
ctx
- a Context
object containing
a list of propertiesoperation
- the name of the method to be invokedarg_list
- an NVList
containing the actual arguments
to the method being invokedresult
- a NamedValue
object to serve as a
container for the method's return valueRequest
objectRequest
,
NVList
,
NamedValue
public Request _create_request(Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exceptions, ContextList contexts)
_create_request
in interface Object
org.omg.CORBA.Object
ctx
- a Context
object containing
a list of propertiesoperation
- the name of the method to be invokedarg_list
- an NVList
containing the actual arguments
to the method being invokedresult
- a NamedValue
object to serve as a
container for the method's return valueexclist
- an ExceptionList
object containing a
list of possible exceptions the method can throwctxlist
- a ContextList
object containing a list of
context strings that need to be resolved and sent with the
Request
instanceRequest
objectRequest
,
NVList
,
NamedValue
,
ExceptionList
,
ContextList
public Object _get_interface_def()
_get_interface_def
in interface Object
org.omg.CORBA.Object
InterfaceDef
object in the Interface Repository
which provides type information about the object referred to by
this object referencepublic ORB _orb()
public Policy _get_policy(int policy_type)
Object
Policy
object of the specified type
which applies to this object._get_policy
in interface Object
org.omg.CORBA.Object
policy_type
- the type of policy to be obtainedPolicy
object of the type specified by
the policy_type parameterBAD_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
Objectpublic DomainManager[] _get_domain_managers()
Object
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._get_domain_managers
in interface Object
org.omg.CORBA.Object
public Object _set_policy_override(Policy[] policies, SetOverrideType set_add)
Object
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._set_policy_override
in interface Object
org.omg.CORBA.Object
policies
- an array of Policy
objects containing
the policies to be added or to be used as replacementsset_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 onesObject
with the given policies replacing
or added to those in this Object
public boolean _is_local()
public ServantObject _servant_preinvoke(String operation, Class expectedType)
operation
- a string containing the operation name.
The operation name corresponds to the operation name as it would be
encoded in a GIOP request.expectedType
- a Class object representing the expected type of the servant.
The expected type is the Class object associated with the operations
class of the stub's interface (e.g. A stub for an interface Foo,
would pass the Class object for the FooOperations interface).public void _servant_postinvoke(ServantObject servant)
servant
- the instance of the ServantObject returned from
the servant_preinvoke() method.public OutputStream _request(String operation, boolean responseExpected)
operation
- a String giving the name of the object.responseExpected
- a boolean -- true if request is not one way.public InputStream _invoke(OutputStream output) throws ApplicationException, RemarshalException
output
- an OutputStream object for dispatching the request.ApplicationException
- an exception -- thrown if the invocation meets application-defined exception.RemarshalException
- an exception -- thrown if the invocation leads to a remarshalling error.public void _releaseReply(InputStream input)
input
- an InputStream object that represents handle to the reply.public String toString()
Object
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
toString
in class Object
java.lang.Object
public int hashCode()
Object
java.util.Hashtable
.
The general contract of hashCode
is:
hashCode
method on each of
the two objects must produce the same integer result.
Object.equals(java.lang.Object)
method, then calling the hashCode method on each of the
two objects must produce distinct integer results. However, the
programmer should be aware that producing distinct integer results
for unequal objects may improve the performance of hashtables.
As much as is reasonably practical, the hashCode method defined by class Object does return distinct integers for distinct objects. (This is typically implemented by converting the internal address of the object into an integer, but this implementation technique is not required by the JavaTM programming language.)
hashCode
in class Object
java.lang.Object
Object.equals(java.lang.Object)
,
Hashtable
public boolean equals(Object obj)
Object
The equals
method implements an equivalence relation:
x
,
x.equals(x)
should return true
.
x
and
y
, x.equals(y)
should return
true
if and only if y.equals(x)
returns
true
.
x
,
y
, and z
, if x.equals(y)
returns true
and y.equals(z)
returns
true
, then x.equals(z)
should return
true
.
x
and y
, multiple invocations of x.equals(y)
consistently return true
or consistently return
false
, provided no information used in
equals
comparisons on the object is modified.
x
,
x.equals(null)
should return false
.
The equals method for class Object
implements
the most discriminating possible equivalence relation on objects;
that is, for any reference values x
and y
,
this method returns true
if and only if x
and
y
refer to the same object (x==y
has the
value true
).
equals
in class Object
java.lang.Object
obj
- the reference object with which to compare.true
if this object is the same as the obj
argument; false
otherwise.Boolean.hashCode()
,
Hashtable
|
JavaTM 2 Platform Std. Ed. v1.3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A. All Rights Reserved.