org.omg.CORBA.portable
Class Delegate
Specifies a vendor specific implementation of the
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.
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<T> 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.
|
clone , equals , extends Object> getClass , finalize , hashCode , notify , notifyAll , toString , wait , wait , wait |
create_request
public abstract Request create_request(Object target,
Context context,
String operation,
NVList parameters,
NamedValue returns)
Create a request to invoke the method of this object.
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.
create_request
public 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.
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.
duplicate
public abstract Object duplicate(Object target)
Duplicate the object reference. This does not make much sense for
java platform and is just included for the sake of compliance with
CORBA APIs.
target
- the CORBA object, to that this operation must be applied.
The method may return the object reference itself.
equals
public boolean equals(Object self,
Object other)
self
- this CORBA object.other
- the other CORBA object.
- true if the objects are equal.
get_interface_def
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.
get_policy
public Policy get_policy(Object target,
int a_policy_type)
throws BAD_PARAM
Returns the
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.
- a corresponding Policy object.
hash
public abstract int hash(Object target,
int maximum)
Get the hashcode this object reference. The same hashcode still
does not means that the references are the same. From the other
side, two different references may still refer to the same CORBA
object. The returned value must not change during the object
lifetime.
target
- the CORBA object, to that this operation must be applied.maximum
- the maximal value to return.
hashCode
public int hashCode(Object target)
Return the hashcode for this CORBA object. The default implementation
delegates call to
hash(Object,int)
, passing Integer.MAX_VALUE as an
argument.
target
- the object, for that the hash code must be computed.
is_a
public abstract boolean is_a(Object target,
String repositoryIdentifer)
Check if this object can be referenced by the given repository id.
target
- the CORBA object, to that this operation must be applied.repositoryIdentifer
- the repository id.
- true if the passed parameter is a repository id of this
CORBA object.
is_equivalent
public 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.
target
- the CORBA object, to that this operation must be applied.other
- the other object reference.
- true if both references refer the same object, false
if they probably can refer different objects.
is_local
public boolean is_local(Object self)
Returns true if the object is local.
self
- the object to check.
- false, always (following 1.4 specs). Override to get
functionality.
non_existent
public abstract boolean non_existent(Object target)
Determines if the server object for this reference has already
been destroyed.
target
- the CORBA object, to that this operation must be applied.
- true if the object has been destroyed, false otherwise.
orb
public ORB orb(Object target)
Provides the reference to ORB.
target
- the object reference.
release
public abstract void release(Object target)
Free resoureces, occupied by this reference. The object implementation
is not notified, and the other references to the same object are not
affected.
target
- the CORBA object, to that this operation must be applied.
releaseReply
public void releaseReply(Object target,
InputStream input)
Release the reply stream back to ORB after finishing reading the data
from it.
request
public abstract Request request(Object target,
String operation)
Create a request to invoke the method of this CORBA object.
target
- the CORBA object, to that this operation must be applied.operation
- the name of the method to invoke.
request
public OutputStream request(Object target,
String operation,
boolean response_expected)
Create a request to invoke the method of this CORBA object.
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.
- the stream where the method arguments should be written.
servant_postinvoke
public void servant_postinvoke(Object self,
ServantObject servant)
This method is always called after invoking the operation on the
local servant.
The default method returns without action.
self
- the object.servant
- the servant.
servant_preinvoke
public ServantObject servant_preinvoke(Object self,
String operation,
Class<T> expectedType)
Returns a servant that should be used for this request.
The servant can also be casted to the expected type, calling the
required method directly.
self
- the objectoperation
- the operationexpectedType
- the expected type of the servant.
This implementation always returns null; override for different
behavior.
- the servant or null if the servant is not an expected type
of the method is not supported, for example, due security reasons.
set_policy_override
public 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.
- the new reference with the changed policies.
toString
public String toString(Object self)
Return a string representation of the passed object.
self
- the CORBA object, to that the string representation must be
returned. By default, the call is delegated to
Object.toString()
.
- the string representation.
Delegate.java --
Copyright (C) 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version.