public abstract class Delegate extends Object
Object
methods. The calls to these
methods are forwarded to the object delegate that can be
replaced, if needed. The first parameter is the actual
CORBA object to that the operation must be applied.
Some methods in this class are not abstract, but no implemented,
thowing the NO_IMPLEMENT
. This, however, does not mean that
they are not implemented in the derived classes as well.Constructor and Description |
---|
Delegate() |
Modifier and Type | Method and Description |
---|---|
abstract Request |
create_request(Object target,
Context context,
String operation,
NVList parameters,
NamedValue returns)
Create a request to invoke the method of this object.
|
abstract Request |
create_request(Object target,
Context context,
String operation,
NVList parameters,
NamedValue returns,
ExceptionList exceptions,
ContextList ctx_list)
Create a request to invoke the method of this object, specifying
context list and the list of the expected exception.
|
abstract Object |
duplicate(Object target)
Duplicate the object reference.
|
boolean |
equals(Object self,
Object other)
Compares two objects for equality.
|
DomainManager[] |
get_domain_managers(Object target)
Retrieve the domain managers for this object.
|
abstract Object |
get_interface_def(Object target) |
Policy |
get_policy(Object target,
int a_policy_type)
Returns the
Policy , applying to this object. |
abstract int |
hash(Object target,
int maximum)
Get the hashcode this object reference.
|
int |
hashCode(Object target)
Return the hashcode for this CORBA object.
|
InputStream |
invoke(Object target,
OutputStream output)
Invoke the operation.
|
abstract boolean |
is_a(Object target,
String repositoryIdentifer)
Check if this object can be referenced by the given repository id.
|
abstract boolean |
is_equivalent(Object target,
Object other)
Return true if the other object references are equivalent, so far as
it is possible to determine this easily.
|
boolean |
is_local(Object self)
Returns true if the object is local.
|
abstract boolean |
non_existent(Object target)
Determines if the server object for this reference has already
been destroyed.
|
ORB |
orb(Object target)
Provides the reference to ORB.
|
abstract void |
release(Object target)
Free resoureces, occupied by this reference.
|
void |
releaseReply(Object target,
InputStream input)
Release the reply stream back to ORB after finishing reading the data
from it.
|
abstract Request |
request(Object target,
String operation)
Create a request to invoke the method of this CORBA object.
|
OutputStream |
request(Object target,
String operation,
boolean response_expected)
Create a request to invoke the method of this CORBA object.
|
void |
servant_postinvoke(Object self,
ServantObject servant)
This method is always called after invoking the operation on the
local servant.
|
ServantObject |
servant_preinvoke(Object self,
String operation,
Class expectedType)
Returns a servant that should be used for this request.
|
Object |
set_policy_override(Object target,
Policy[] policies,
SetOverrideType how)
Returns a new object with the new policies either replacing or
extending the current policies, depending on the second parameter.
|
String |
toString(Object self)
Return a string representation of the passed object.
|
public Delegate()
public abstract Request create_request(Object target, Context context, String operation, NVList parameters, NamedValue returns)
target
- the CORBA object, to that this operation must be applied.context
- a list of additional properties.operation
- the name of method to be invoked.parameters
- the method parameters.returns
- the container for tge method returned value.public abstract Request create_request(Object target, Context context, String operation, NVList parameters, NamedValue returns, ExceptionList exceptions, ContextList ctx_list)
target
- the CORBA object, to that this operation must be applied.context
- a list of additional properties.operation
- the name of method to be invoked.parameters
- the method parameters.returns
- the container for tge method returned value.exceptions
- the list of the possible exceptions that the method
can throw.ctx_list
- the list of the context strings that need to be
resolved and send as a context instance.public abstract Object duplicate(Object target)
target
- the CORBA object, to that this operation must be applied.
The method may return the object reference itself.this
.public DomainManager[] get_domain_managers(Object target)
target
- the CORBA object, to that this operation must be applied.NO_IMPLEMENT,
- always (following the 1.4 specification).public abstract Object get_interface_def(Object target)
target
- the CORBA object, to that this operation must be applied.
Get the InterfaceDef
for this Object.public Policy get_policy(Object target, int a_policy_type) throws BAD_PARAM
Policy
, applying to this object.target
- the CORBA object, to that this operation must be applied.a_policy_type
- a type of policy to be obtained.NO_IMPLEMENT,
- always (following the 1.4 specification).BAD_PARAM
public abstract int hash(Object target, int maximum)
target
- the CORBA object, to that this operation must be applied.maximum
- the maximal value to return.public abstract boolean is_a(Object target, String repositoryIdentifer)
target
- the CORBA object, to that this operation must be applied.repositoryIdentifer
- the repository id.public abstract boolean is_equivalent(Object target, Object other)
target
- the CORBA object, to that this operation must be applied.other
- the other object reference.public boolean is_local(Object self)
self
- the object to check.public abstract boolean non_existent(Object target)
target
- the CORBA object, to that this operation must be applied.public boolean equals(Object self, Object other)
Object.equals(java.lang.Object)
.self
- this CORBA object.other
- the other CORBA object.public int hashCode(Object target)
hash(org.omg.CORBA.Object, int)
, passing Integer.MAX_VALUE as an
argument.target
- the object, for that the hash code must be computed.public InputStream invoke(Object target, OutputStream output) throws ApplicationException, RemarshalException
target
- the invocation target.output
- the stream, containing the written arguments.ApplicationException
- if the application throws an exception,
defined as a part of its remote method definition.RemarshalException
- if reading(remarshalling) fails.NO_IMPLEMENT,
- always (following the 1.4 specification).public ORB orb(Object target)
target
- the object reference.NO_IMPLEMENT,
- always (following the 1.4 specification).public abstract void release(Object target)
target
- the CORBA object, to that this operation must be applied.public void releaseReply(Object target, InputStream input)
target
- the CORBA object, to that this operation must be applied.input
- the stream, normally returned by invoke(org.omg.CORBA.Object, org.omg.CORBA.portable.OutputStream)
or
ApplicationException.getInputStream()
, can be null.
The default method returns without action.public abstract Request request(Object target, String operation)
target
- the CORBA object, to that this operation must be applied.operation
- the name of the method to invoke.public OutputStream request(Object target, String operation, boolean response_expected)
target
- the CORBA object, to that this operation must be applied.operation
- the name of the method to invoke.response_expected
- specifies if this is one way message or the
response to the message is expected.public void servant_postinvoke(Object self, ServantObject servant)
self
- the object.servant
- the servant.public ServantObject servant_preinvoke(Object self, String operation, Class expectedType)
self
- the objectoperation
- the operationexpectedType
- the expected type of the servant.
This implementation always returns null; override for different
behavior.public Object set_policy_override(Object target, Policy[] policies, SetOverrideType how)
target
- the CORBA object, to that this operation must be applied.policies
- the policy additions or replacements.how
- either SetOverrideType.SET_OVERRIDE
to override the
current policies of SetOverrideType.ADD_OVERRIDE
to replace
them.NO_IMPLEMENT,
- always (following the 1.4 specification).public String toString(Object self)
self
- the CORBA object, to that the string representation must be
returned. By default, the call is delegated to
Object.toString()
.