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

LocalObject

public class LocalObject extends Object implements org.omg.CORBA.Object

Used as a base class for implementation of a local IDL interface in the Java language mapping. It is a class which implements all the operations in the org.omg.CORBA.Object interface.

Local interfaces are implemented by using CORBA::LocalObject to provide implementations of Object pseudo operations and any other ORB-specific support mechanisms that are appropriate for such objects. Object implementation techniques are inherently language-mapping specific. Therefore, the LocalObject type is not defined in IDL, but is specified in each language mapping.

Methods that do not apply to local objects throw an org.omg.CORBA.NO_IMPLEMENT exception with the message, "This is a locally contrained object." Attempting to use a LocalObject to create a DII request results in NO_IMPLEMENT system exception. Attempting to marshal or stringify a LocalObject results in a MARSHAL system exception. Narrowing and widening references to LocalObjects must work as for regular object references.

LocalObject is to be used as the base class of locally constrained objects, such as those in the PortableServer module. The specification here is based on the CORBA Components Volume I - orbos/99-07-01

see
CORBA package comments for unimplemented features

Fields Summary
private static String
reason
Constructors Summary
public LocalObject()
Constructs a default LocalObject instance.


               
      
Methods Summary
public Request_create_request(Context ctx, java.lang.String operation, NVList arg_list, NamedValue result, ExceptionList exceptions, ContextList contexts)
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.

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
exceptions an ExceptionList object containing a list of possible exceptions the method can throw
param
contexts a ContextList object containing a list of context strings that need to be resolved and sent with the Request instance
return
the new Request object initialized with the given arguments
exception
NO_IMPLEMENT
see
CORBA package comments for unimplemented features

        throw new org.omg.CORBA.NO_IMPLEMENT(reason);
    
public Request_create_request(Context ctx, java.lang.String operation, NVList arg_list, NamedValue result)
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.

param
ctx a Context object containing a list of properties
param
operation the String representing 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
a new Request object initialized with the given arguments
exception
NO_IMPLEMENT
see
CORBA package comments for unimplemented features

        throw new org.omg.CORBA.NO_IMPLEMENT(reason);
    
public org.omg.CORBA.Object_duplicate()
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.

return
a duplicate of this LocalObject instance.
exception
NO_IMPLEMENT
see
CORBA package comments for unimplemented features

        throw new org.omg.CORBA.NO_IMPLEMENT(reason);
    
public org.omg.CORBA.DomainManager[]_get_domain_managers()
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method does not apply to local objects and is therefore not implemented. This method is the default implementation of the org.omg.CORBA.Object method.

exception
NO_IMPLEMENT
see
CORBA package comments for unimplemented features

        throw new org.omg.CORBA.NO_IMPLEMENT(reason);
    
public org.omg.CORBA.Object_get_interface()
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method does not apply to local objects and is therefore not implemented. This method is the default implementation of the org.omg.CORBA.Object method.

return
NO_IMPLEMENT because this is a locally constrained object and this method does not apply to local objects
exception
NO_IMPLEMENT because this is a locally constrained object and this method does not apply to local objects
see
CORBA package comments for unimplemented features

        throw new org.omg.CORBA.NO_IMPLEMENT(reason);
    
public org.omg.CORBA.Object_get_interface_def()
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.

exception
NO_IMPLEMENT
see
CORBA package comments for unimplemented features

	// First try to call the delegate implementation class's
	// "Object get_interface_def(..)" method (will work for JDK1.2 
	// ORBs).
	// Else call the delegate implementation class's
	// "InterfaceDef get_interface(..)" method using reflection
	// (will work for pre-JDK1.2 ORBs).

        throw new org.omg.CORBA.NO_IMPLEMENT(reason);
    
public org.omg.CORBA.Policy_get_policy(int policy_type)
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method does not apply to local objects and is therefore not implemented. This method is the default implementation of the org.omg.CORBA.Object method.

param
policy_type an int
return
NO_IMPLEMENT because this is a locally constrained object and this method does not apply to local objects
exception
NO_IMPLEMENT because this is a locally constrained object and this method does not apply to local objects
see
CORBA package comments for unimplemented features

        throw new org.omg.CORBA.NO_IMPLEMENT(reason);
    
public int_hash(int maximum)
Returns a hash value that is consistent for the lifetime of the object, using the given number as the maximum. This method is the default implementation of the org.omg.CORBA.Object method.

param
maximum an int identifying maximum value of the hashcode
return
this instance's hashcode

	return hashCode() ;
    
public InputStream_invoke(OutputStream output)
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.

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.

param
output the OutputStream to invoke
return
NO_IMPLEMENT because this is a locally constrained object and this method does not apply to local objects
throws
ApplicationException If an exception occurs, _invoke may throw an ApplicationException object which contains an InputStream from which the user exception state may be unmarshaled.
throws
RemarshalException If an exception occurs, _invoke may throw an ApplicationException object which contains an InputStream from which the user exception state may be unmarshaled.
exception
NO_IMPLEMENT because this is a locally constrained object and this method does not apply to local objects
see
CORBA package comments for unimplemented features

	throw new org.omg.CORBA.NO_IMPLEMENT(reason);
    
public boolean_is_a(java.lang.String repository_id)
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method does not apply to local objects and is therefore not implemented. This method is the default implementation of the org.omg.CORBA.Object method.

param
repository_id a String
return
NO_IMPLEMENT because this is a locally constrained object and this method does not apply to local objects
exception
NO_IMPLEMENT because this is a locally constrained object and this method does not apply to local objects
see
CORBA package comments for unimplemented features

        throw new org.omg.CORBA.NO_IMPLEMENT(reason);
    
public boolean_is_equivalent(org.omg.CORBA.Object that)

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.

Default implementation of the org.omg.CORBA.Object method.

param
that the 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.

	return equals(that) ;
    
public boolean_is_local()
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.

Returns true for this LocalObject instance.

return
true always
exception
NO_IMPLEMENT
see
CORBA package comments for unimplemented features

	throw new org.omg.CORBA.NO_IMPLEMENT(reason);
    
public boolean_non_existent()
Always returns false. This method is the default implementation of the org.omg.CORBA.Object method.

return
false

	return false;
    
public org.omg.CORBA.ORB_orb()
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.

return
the ORB instance that created the Delegate contained in this ObjectImpl
exception
NO_IMPLEMENT
see
CORBA package comments for unimplemented features

        throw new org.omg.CORBA.NO_IMPLEMENT(reason);
    
public void_release()
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.

exception
NO_IMPLEMENT
see
CORBA package comments for unimplemented features

        throw new org.omg.CORBA.NO_IMPLEMENT(reason);
    
public void_releaseReply(InputStream input)
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.

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 no-op.

param
input the reply stream back to the ORB or null
exception
NO_IMPLEMENT
see
CORBA package comments for unimplemented features

        throw new org.omg.CORBA.NO_IMPLEMENT(reason);
    
public OutputStream_request(java.lang.String operation, boolean responseExpected)
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.

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

param
operation the name of the operation being requested
param
responseExpected true if a response is expected, false if it is a one-way call
return
NO_IMPLEMENT because this is a locally constrained object and this method does not apply to local objects
exception
NO_IMPLEMENT because this is a locally constrained object and this method does not apply to local objects
see
CORBA package comments for unimplemented features

        throw new org.omg.CORBA.NO_IMPLEMENT(reason);
    
public Request_request(java.lang.String operation)
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.

param
operation a String giving the name of an operation to be performed by the request that is returned
return
a Request object with the given operation
exception
NO_IMPLEMENT
see
CORBA package comments for unimplemented features

        throw new org.omg.CORBA.NO_IMPLEMENT(reason);
    
public void_servant_postinvoke(ServantObject servant)
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.

param
servant the servant object on which to post-invoke
exception
NO_IMPLEMENT
see
CORBA package comments for unimplemented features

        throw new org.omg.CORBA.NO_IMPLEMENT(reason);
    
public ServantObject_servant_preinvoke(java.lang.String operation, java.lang.Class expectedType)
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.

param
operation a String indicating which operation to preinvoke
param
expectedType the class of the type of operation mentioned above
return
NO_IMPLEMENT because this is a locally constrained object and this method does not apply to local objects
exception
NO_IMPLEMENT because this is a locally constrained object and this method does not apply to local object
see
CORBA package comments for unimplemented features

        throw new org.omg.CORBA.NO_IMPLEMENT(reason);
    
public org.omg.CORBA.Object_set_policy_override(org.omg.CORBA.Policy[] policies, org.omg.CORBA.SetOverrideType set_add)
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method does not apply to local objects and is therefore not implemented. This method is the default implementation of the org.omg.CORBA.Object method.

param
policies an array
param
set_add a flag
return
NO_IMPLEMENT because this is a locally constrained object and this method does not apply to local objects
exception
NO_IMPLEMENT because this is a locally constrained object and this method does not apply to local objects
see
CORBA package comments for unimplemented features

        throw new org.omg.CORBA.NO_IMPLEMENT(reason);
    
public booleanvalidate_connection()
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method does not apply to local objects and is therefore not implemented. This method is the default implementation of the org.omg.CORBA.Object method.

return
NO_IMPLEMENT because this is a locally constrained object and this method does not apply to local objects
exception
NO_IMPLEMENT because this is a locally constrained object and this method does not apply to local objects
see
CORBA package comments for unimplemented features

        throw new org.omg.CORBA.NO_IMPLEMENT(reason);