gnu.CORBA

Class SimpleDelegate

Implemented Interfaces:
IorProvider
Known Direct Subclasses:
IorDelegate

public class SimpleDelegate
extends Delegate
implements IorProvider

The delegate, implementing the basic functionality only. This delegate is set in ORG.connect(org.omg.CORBA.Object) if ORB determines that the object is an instance of the ObjectImpl and no other delegate is set.

Field Summary

protected IOR
ior
The ior.
protected ORB
orb
The orb.

Constructor Summary

SimpleDelegate(ORB an_orb, IOR an_ior)

Method Summary

Request
create_request(Object target, Context context, String operation, NVList parameters, NamedValue returns)
Create the request for the local call
Request
create_request(Object target, Context context, String operation, NVList parameters, NamedValue returns, ExceptionList exceptions, ContextList ctx_list)
Create the request for the local call.
Object
duplicate(Object target)
Not implemented.
boolean
equals(Object self, Object other)
Performs direct comparison ('==').
IOR
getIor()
Get the IOR of this object.
Object
get_interface_def(Object target)
Not implemented.
int
hash(Object target, int maximum)
Return the hashcode (0 <= hashcode <32maximum).
int
hashCode(Object target)
Delegates functionality to java.lang.Object.hashCode();
boolean
is_a(Object target, String repositoryIdentifer)
Check if this object can be referenced by the given repository id.
boolean
is_equivalent(Object target, Object other)
Returns true if the objects are the same or have the same delegate set.
boolean
is_local(Object self)
Returns true by default.
boolean
non_existent(Object target)
Returns true if the target is null.
ORB
orb(Object target)
Returns the ORB, passed in constructor, regardless of the argument.
void
release(Object target)
Returns without action.
Request
request(Object target, String operation)
This method assumes that the target is local and connected to the ORB.
void
setIor(IOR an_ior)
Set the IOR of this object.

Methods inherited from class org.omg.CORBA.portable.Delegate

create_request, create_request, duplicate, equals, get_domain_managers, get_interface_def, get_policy, hash, hashCode, invoke, is_a, is_equivalent, is_local, non_existent, orb, release, releaseReply, request, request, servant_postinvoke, set_policy_override, toString

Methods inherited from class java.lang.Object

clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Details

ior

protected IOR ior
The ior.

orb

protected final ORB orb
The orb.

Constructor Details

SimpleDelegate

public SimpleDelegate(ORB an_orb,
                      IOR an_ior)

Method Details

create_request

public Request create_request(Object target,
                              Context context,
                              String operation,
                              NVList parameters,
                              NamedValue returns)
Create the request for the local call
Overrides:
create_request in interface Delegate

create_request

public Request create_request(Object target,
                              Context context,
                              String operation,
                              NVList parameters,
                              NamedValue returns,
                              ExceptionList exceptions,
                              ContextList ctx_list)
Create the request for the local call.
Overrides:
create_request in interface Delegate

duplicate

public Object duplicate(Object target)
Not implemented.
Overrides:
duplicate in interface Delegate

equals

public boolean equals(Object self,
                      Object other)
Performs direct comparison ('==').

getIor

public IOR getIor()
Get the IOR of this object.
Specified by:
getIor in interface IorProvider

get_interface_def

public Object get_interface_def(Object target)
Not implemented.
Overrides:
get_interface_def in interface Delegate

hash

public int hash(Object target,
                int maximum)
Return the hashcode (0 <= hashcode <32maximum).
Overrides:
hash in interface Delegate

hashCode

public int hashCode(Object target)
Delegates functionality to java.lang.Object.hashCode();
Overrides:
hashCode in interface Delegate

is_a

public boolean is_a(Object target,
                    String repositoryIdentifer)
Check if this object can be referenced by the given repository id.
Overrides:
is_a in interface Delegate
Parameters:
target - the CORBA object, must be an instance of ObjectImpl.
repositoryIdentifer - the repository id.
Returns:
true if the passed parameter is a repository id of this CORBA object.

is_equivalent

public boolean is_equivalent(Object target,
                             Object other)
Returns true if the objects are the same or have the same delegate set. All objects in this implementation have a separate delegate.
Overrides:
is_equivalent in interface Delegate

is_local

public boolean is_local(Object self)
Returns true by default.
Overrides:
is_local in interface Delegate

non_existent

public boolean non_existent(Object target)
Returns true if the target is null.
Overrides:
non_existent in interface Delegate

orb

public ORB orb(Object target)
Returns the ORB, passed in constructor, regardless of the argument. This class requires a single instance per each object.
Overrides:
orb in interface Delegate

release

public void release(Object target)
Returns without action.
Overrides:
release in interface Delegate

request

public Request request(Object target,
                       String operation)
This method assumes that the target is local and connected to the ORB.
Overrides:
request in interface Delegate

setIor

public void setIor(IOR an_ior)
Set the IOR of this object. The IOR must be newly set if the server reports that the object has permanently moved to a new location.
Parameters:
an_ior - the new IOR.

Local_delegate.java -- Copyright (C) 2005 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.