Spec-Zone .ru
спецификации, руководства, описания, API
JavaTM 2 Platform
Standard Edition

org.omg.CORBA.portable
Class ObjectImpl

java.lang.Object
  |
  +--org.omg.CORBA.portable.ObjectImpl
Direct Known Subclasses:
_BindingIteratorStub, _NamingContextStub, DynamicImplementation

public abstract class ObjectImpl
extends Object
implements Object

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()
          return the Delegate contained in this ObjectImpl instance.
 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()
          return the array of all repository identifiers supported by this ObjectImpl instance (e.g.
 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()
           
 boolean _non_existent()
          default implementation of the org.omg.CORBA.Object method.
 ORB _orb()
          return the ORB instance which created the Delegate contained in this ObjectImpl.
 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)
           
 ServantObject _servant_preinvoke(String operation, Class expectedType)
           
 void _set_delegate(Delegate delegate)
          set the Delegate contained in this ObjectImpl instance.
 Object _set_policy_override(Policy[] policies, SetOverrideType set_add)
           
 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

ObjectImpl

public ObjectImpl()
Method Detail

_get_delegate

public Delegate _get_delegate()
return the Delegate contained in this ObjectImpl instance.

_set_delegate

public void _set_delegate(Delegate delegate)
set the Delegate contained in this ObjectImpl instance.

_ids

public abstract String[] _ids()
return the array of all repository identifiers supported by this ObjectImpl instance (e.g. For a stub, _ids() will return information about all interfaces supported by the stub).

_duplicate

public Object _duplicate()
default implementation of the org.omg.CORBA.Object method.
Specified by:
_duplicate in interface Object
Tags copied from interface: Object
Returns:
a duplicate of this object reference or this object reference itself

_release

public void _release()
default implementation of the org.omg.CORBA.Object method.
Specified by:
_release in interface Object

_is_a

public boolean _is_a(String repository_id)
default implementation of the org.omg.CORBA.Object method.
Specified by:
_is_a in interface Object
Tags copied from interface: Object
Parameters:
repositoryIdentifier - the interface to check against
Returns:
true if this object reference is an instance of a class that implements the interface; false otherwise

_is_equivalent

public boolean _is_equivalent(Object that)
default implementation of the org.omg.CORBA.Object method.
Specified by:
_is_equivalent in interface Object
Tags copied from interface: Object
Parameters:
other - the other object reference with which to check for equivalence
Returns:
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.

_non_existent

public boolean _non_existent()
default implementation of the org.omg.CORBA.Object method.
Specified by:
_non_existent in interface Object
Tags copied from interface: Object
Returns:
true if the ORB knows authoritatively that the server object does not exist; false otherwise

_hash

public int _hash(int maximum)
default implementation of the org.omg.CORBA.Object method.
Specified by:
_hash in interface Object
Tags copied from interface: Object
Parameters:
maximum - the upper bound on the hash value returned by the ORB
Returns:
the ORB-internal hash identifier for this object reference

_request

public Request _request(String operation)
default implementation of the org.omg.CORBA.Object method.
Specified by:
_request in interface Object
Tags copied from interface: Object
Parameters:
operation - the name of the method to be invoked using the Request instance
Returns:
the newly-created Request instance

_create_request

public Request _create_request(Context ctx,
                               String operation,
                               NVList arg_list,
                               NamedValue result)
default implementation of the org.omg.CORBA.Object method.
Specified by:
_create_request in interface Object
Tags copied from interface: Object
Parameters:
ctx - a Context object containing a list of properties
operation - the name of the method to be invoked
arg_list - an NVList containing the actual arguments to the method being invoked
result - a NamedValue object to serve as a container for the method's return value
Returns:
the newly-created Request object
See Also:
Request, NVList, NamedValue

_create_request

public 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.
Specified by:
_create_request in interface Object
Tags copied from interface: Object
Parameters:
ctx - a Context object containing a list of properties
operation - the name of the method to be invoked
arg_list - an NVList containing the actual arguments to the method being invoked
result - a NamedValue object to serve as a container for the method's return value
exclist - an ExceptionList object containing a list of possible exceptions the method can throw
ctxlist - a ContextList object containing a list of context strings that need to be resolved and sent with the Request instance
Returns:
the newly-created Request object
See Also:
Request, NVList, NamedValue, ExceptionList, ContextList

_get_interface_def

public Object _get_interface_def()
default implementation of the org.omg.CORBA.Object method.
Specified by:
_get_interface_def in interface Object
Tags copied from interface: Object
Returns:
the InterfaceDef object in the Interface Repository which provides type information about the object referred to by this object reference

_orb

public ORB _orb()
return the ORB instance which created the Delegate contained in this ObjectImpl.

_get_policy

public Policy _get_policy(int policy_type)
Description copied from interface: Object
Returns the Policy object of the specified type which applies to this object.
Specified by:
_get_policy in interface Object
Tags copied from interface: Object
Parameters:
policy_type - the type of policy to be obtained
Returns:
A Policy object of the type specified by the policy_type parameter
Throws:
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

_get_domain_managers

public DomainManager[] _get_domain_managers()
Description copied from interface: Object
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.
Specified by:
_get_domain_managers in interface Object
Tags copied from interface: Object
Returns:
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.

_set_policy_override

public Object _set_policy_override(Policy[] policies,
                                   SetOverrideType set_add)
Specified by:
_set_policy_override in interface Object

_is_local

public boolean _is_local()

_servant_preinvoke

public ServantObject _servant_preinvoke(String operation,
                                        Class expectedType)

_servant_postinvoke

public void _servant_postinvoke(ServantObject servant)

_request

public OutputStream _request(String operation,
                             boolean responseExpected)
_request is called by a stub to obtain an OutputStream for marshaling arguments. The stub must supply the operation name, and indicate if a response is expected (i.e is this a oneway call).

_invoke

public InputStream _invoke(OutputStream output)
                    throws ApplicationException,
                           RemarshalException
_invoke is called to invoke an operation. The stub provides an OutputStream that was previously returned by a _request() call. _invoke returns an InputStream which contains the marshaled reply. If an exception occurs, _invoke may throw an ApplicationException object which contains an InputStream from which the user exception state may be unmarshaled.

_releaseReply

public 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. The stub passes the InputStream returned by _invoke() or ApplicationException.getInputStream(). A null value may also be passed to _releaseReply, in which case the method is a noop.

toString

public String toString()
Description copied from class: Object
Returns a string representation of the object. In general, the 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 recommendedthat 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())
 
Overrides:
toString in class Object
Tags copied from class: Object
Returns:
a string representation of the object.

hashCode

public int hashCode()
Description copied from class: Object
Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided by java.util.Hashtable.

The general contract of hashCode is:

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.)

Overrides:
hashCode in class Object
Tags copied from class: Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable

equals

public boolean equals(Object obj)
Description copied from class: Object
Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation:

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).

Overrides:
equals in class Object
Tags copied from class: Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.
See Also:
Boolean.hashCode(), Hashtable

JavaTM 2 Platform
Standard Edition

Submit a bug or feature
Java, Java 2D, and JDBC are a trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1999 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.