This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


org.omg.CORBA.portable
class ObjectImpl

java.lang.Object extended by org.omg.CORBA.portable.ObjectImpl
All Implemented Interfaces:
Object
Direct Known Subclasses:
DynamicImplementation, ObjectImpl, _BindingIteratorStub, _DynAnyFactoryStub, _DynAnyStub, _DynArrayStub, _DynEnumStub, _DynFixedStub, _DynSequenceStub, _DynStructStub, _DynUnionStub, _DynValueStub, _IDLTypeStub, _NamingContextExtStub, _NamingContextStub, _PolicyStub, _ServantActivatorStub, _ServantLocatorStub

public abstract class ObjectImpl
extends Object
implements Object

The common base class for all stub classes; 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 allows for portable stubs because the Delegate can be implemented by a different vendor-specific ORB.


Constructor Summary

          
 
Method Summary
 boolean

          Compares this ObjectImpl object with the given one for equality.
 int

          Returns the hash code for this ObjectImpl object.
 String

          Returns a String object that represents this ObjectImpl object.
 Request
_create_request(Context ctx, String operation, NVList arg_list, NamedValue result)

          Creates a Request object that contains the given context, method, argument list, and container for the result.
 Request
_create_request(Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exceptions, ContextList contexts)

          Creates a Request object that contains the given context, method, argument list, container for the result, exceptions, and list of property names to be used in resolving the context strings.
 Object

          Returns a duplicate of this ObjectImpl object.
 Delegate

          Retrieves the reference to the vendor-specific Delegate object to which this ObjectImpl object delegates all methods invoked on it.
 DomainManager[]

          Retrieves a list of the domain managers for this ObjectImpl object.
 Object

          Retrieves the interface definition for this ObjectImpl object.
 Policy
_get_policy(int policy_type)

          Retrieves the Policy object for this ObjectImpl object that has the given policy type.
 int
_hash(int maximum)

          Retrieves the hash code that serves as an ORB-internal identifier for this ObjectImpl object.
abstract String[]

          Retrieves a string array containing the repository identifiers supported by this ObjectImpl object.
 InputStream

          Invokes an operation and returns an InputStream object for reading the response.
 boolean
_is_a(String repository_id)

          Checks whether the object identified by the given repository identifier is an ObjectImpl object.
 boolean

          Checks whether the the given ObjectImpl object is equivalent to this ObjectImpl object.
 boolean

          Checks whether this ObjectImpl object is implemented by a local servant.
 boolean

          Checks whether the server object for this ObjectImpl object has been destroyed.
 ORB

          Returns a reference to the ORB associated with this object and its delegate.
 void

          Releases the resources associated with this ObjectImpl object.
 void

          Releases the given reply stream back to the ORB when unmarshalling has completed after a call to the method _invoke.
 Request
_request(String operation)

          Creates a Request object containing the given method that can be used with the Dynamic Invocation Interface.
 OutputStream
_request(String operation, boolean responseExpected)

          Returns an OutputStream object to use for marshalling the arguments of the given method.
 void

          Is called by the local stub after it has invoked an operation on the local servant that was previously retrieved from a call to the method _servant_preinvoke.
 ServantObject
_servant_preinvoke(String operation, Class expectedType)

          Returns a Java reference to the local servant that should be used for sending a request for the method specified.
 void

          Sets the Delegate for this ObjectImpl instance to the given Delegate object.
 Object

          Sets this ObjectImpl object's override type for the given policies to the given instance of SetOverrideType.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectImpl

public ObjectImpl()
Method Detail

equals

public boolean equals(Object obj)
Compares this ObjectImpl object with the given one for equality.

Overrides:
equals in class Object
Parameters:
obj - the object with which to compare this object
Returns:
true if the two objects are equal; false otherwise

hashCode

public int hashCode()
Returns the hash code for this ObjectImpl object.

Overrides:
hashCode in class Object
Returns:
the hash code for this object

toString

public String toString()
Returns a String object that represents this ObjectImpl object.

Overrides:
toString in class Object
Returns:
the String representation of this object

_create_request

public Request _create_request(Context ctx,
                               String operation,
                               NVList arg_list,
                               NamedValue result)
Creates a Request object that contains the given context, method, argument list, and container for the result.

Parameters:
ctx - the Context for the request
operation - the method that the new Request object will invoke
arg_list - the arguments for the method; an NVList in which each argument is a NamedValue object
result - a NamedValue object to be used for returning the result of executing the request's method
Returns:
a new Request object initialized with the given context, method, argument list, and container for the return value

_create_request

public Request _create_request(Context ctx,
                               String operation,
                               NVList arg_list,
                               NamedValue result,
                               ExceptionList exceptions,
                               ContextList contexts)
Creates a Request object that contains the given context, method, argument list, container for the result, exceptions, and list of property names to be used in resolving the context strings. This Request object is for use in the Dynamic Invocation Interface.

Parameters:
ctx - the Context object that contains the context strings that must be resolved before they are sent along with the request
operation - the method that the new Request object will invoke
arg_list - the arguments for the method; an NVList in which each argument is a NamedValue object
result - a NamedValue object to be used for returning the result of executing the request's method
exceptions - a list of the exceptions that the given method throws
contexts - a list of the properties that are needed to resolve the contexts in ctx; the strings in contexts are used as arguments to the method Context.get_values, which returns the value associated with the given property
Returns:
a new Request object initialized with the given context strings to resolve, method, argument list, container for the result, exceptions, and list of property names to be used in resolving the context strings

_duplicate

public Object _duplicate()
Returns a duplicate of this ObjectImpl object.

Returns:
an orb.omg.CORBA.Object object that is a duplicate of this object

_get_delegate

public Delegate _get_delegate()
Retrieves the reference to the vendor-specific Delegate object to which this ObjectImpl object delegates all methods invoked on it.

Returns:
the Delegate contained in this ObjectImpl instance

_get_domain_managers

public DomainManager[] _get_domain_managers()
Retrieves a list of the domain managers for this ObjectImpl object.

Returns:
an array containing the DomainManager objects for this instance of ObjectImpl

_get_interface_def

public Object _get_interface_def()
Retrieves the interface definition for this ObjectImpl object.

Returns:
the org.omg.CORBA.Object instance that is the interface definition for this ObjectImpl object

_get_policy

public Policy _get_policy(int policy_type)
Retrieves the Policy object for this ObjectImpl object that has the given policy type.

Parameters:
policy_type - an int indicating the policy type
Returns:
the Policy object that is the specified policy type and that applies to this ObjectImpl object

_hash

public int _hash(int maximum)
Retrieves the hash code that serves as an ORB-internal identifier for this ObjectImpl object.

Parameters:
maximum - an int indicating the upper bound on the hash value returned by the ORB
Returns:
an int representing the hash code for this ObjectImpl object

_ids

public abstract String[] _ids()
Retrieves a string array containing the repository identifiers supported by this ObjectImpl object. For example, for a stub, this method returns information about all the interfaces supported by the stub.

Returns:
the array of all repository identifiers supported by this ObjectImpl instance

_invoke

public InputStream _invoke(OutputStream output)
                    throws ApplicationException,
                           RemarshalException
Invokes an operation and returns an InputStream object for reading the response. The stub provides the OutputStream object that was previously returned by a call to the _request method. The method specified as an argument to _request when it was called previously is the method that this method invokes.

If an exception occurs, the _invoke method may throw an ApplicationException object that contains an InputStream from which the user exception state may be unmarshalled.

Parameters:
output - an OutputStream object for dispatching the request
Returns:
an InputStream object containing the marshalled response to the method invoked
Throws:
ApplicationException - if the invocation meets application-defined exception
RemarshalException - if the invocation leads to a remarshalling error

_is_a

public boolean _is_a(String repository_id)
Checks whether the object identified by the given repository identifier is an ObjectImpl object.

Parameters:
repository_id - a String object with the repository identifier to check
Returns:
true if the object identified by the given repository id is an instance of ObjectImpl; false otherwise

_is_equivalent

public boolean _is_equivalent(Object that)
Checks whether the the given ObjectImpl object is equivalent to this ObjectImpl object.

Parameters:
that - an instance of ObjectImpl to compare with this ObjectImpl object
Returns:
true if the given object is equivalent to this ObjectImpl object; false otherwise

_is_local

public boolean _is_local()
Checks whether this ObjectImpl object is implemented by a local servant. If so, local invocation API's may be used.

Returns:
true if this object is implemented by a local servant; false otherwise

_non_existent

public boolean _non_existent()
Checks whether the server object for this ObjectImpl object has been destroyed.

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

_orb

public ORB _orb()
Returns a reference to the ORB associated with this object and its delegate. This is the ORB object that created the delegate.

Returns:
the ORB instance that created the Delegate object contained in this ObjectImpl object

_release

public void _release()
Releases the resources associated with this ObjectImpl object.


_releaseReply

public void _releaseReply(InputStream input)
Releases the given reply stream back to the ORB when unmarshalling has completed after a call to the method _invoke. Calling this method is optional for the stub.

Parameters:
input - the InputStream object that was returned by the _invoke method or the ApplicationException.getInputStream method; may be null, in which case this method does nothing

_request

public Request _request(String operation)
Creates a Request object containing the given method that can be used with the Dynamic Invocation Interface.

Parameters:
operation - the method to be invoked by the new Request object
Returns:
a new Request object initialized with the given method

_request

public OutputStream _request(String operation,
                             boolean responseExpected)
Returns an OutputStream object to use for marshalling the arguments of the given method. This method is called by a stub, which must indicate if a response is expected, that is, whether or not the call is oneway.

Parameters:
operation - a String giving the name of the method.
responseExpected - a boolean -- true if the request is not one way, that is, a response is expected
Returns:
an OutputStream object for dispatching the request

_servant_postinvoke

public void _servant_postinvoke(ServantObject servant)
Is called by the local stub after it has invoked an operation on the local servant that was previously retrieved from a call to the method _servant_preinvoke. The _servant_postinvoke method must be called if the _servant_preinvoke method returned a non-null value, even if an exception was thrown by the method invoked by the servant. For this reason, the call to the method _servant_postinvoke should be placed in a Java finally clause.

Parameters:
servant - the instance of the ServantObject returned by the _servant_preinvoke method

_servant_preinvoke

public ServantObject _servant_preinvoke(String operation,
                                        Class expectedType)
Returns a Java reference to the local servant that should be used for sending a request for the method specified. If this ObjectImpl object is a local stub, it will invoke the _servant_preinvoke method before sending a request in order to obtain the ServantObject instance to use.

If a ServantObject object is returned, its servant field has been set to an object of the expected type (Note: the object may or may not be the actual servant instance). The local stub may cast the servant field to the expected type, and then invoke the operation directly. The ServantRequest object is valid for only one invocation and cannot be used for more than one invocation.

Parameters:
operation - a String containing the name of the method to be invoked. This name should correspond to the method name as it would be encoded in a GIOP request.
expectedType - a Class object representing the expected type of the servant that is returned. This expected type is the Class object associated with the operations class for the stub's interface. For example, a stub for an interface Foo would pass the Class object for the FooOperations interface.
Returns:
(1) a ServantObject object, which may or may not be the actual servant instance, or (2) null if (a) the servant is not local or (b) the servant has ceased to be local due to a ForwardRequest from a POA ServantManager

_set_delegate

public void _set_delegate(Delegate delegate)
Sets the Delegate for this ObjectImpl instance to the given Delegate object. All method invocations on this ObjectImpl object will be forwarded to this delegate.

Parameters:
delegate - the Delegate instance to which all method calls on this ObjectImpl object will be delegated; may be implemented by a third-party ORB

_set_policy_override

public Object _set_policy_override(Policy[] policies,
                                   SetOverrideType set_add)
Sets this ObjectImpl object's override type for the given policies to the given instance of SetOverrideType.

Parameters:
policies - an array of Policy objects with the policies that will replace the current policies or be added to the current policies
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
Returns:
an Object with the given policies replacing or added to its previous policies


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.