com.sun.jaw.impl.adaptor.rmi
Class AdaptorClient

java.lang.Object
  |
  +--com.sun.jaw.impl.adaptor.rmi.AdaptorClient
Direct Known Subclasses:
AdaptorClientRO

public class AdaptorClient
extends java.lang.Object
implements AdaptorMO

The AdaptorClient class provides an implementation of the AdaptorMO interface based on the Java remote method invocation (RMI) system.

In order to identify the Java Dynamic Management agent the adaptor needs to communicate with, the method connect needs to be invoked with the RMI identity of the RMI Adaptor server.

See Also:
AdaptorMO, AdaptorClientRO, AdaptorServerImpl, Serialized Form

Field Summary
protected  java.lang.ClassLoader classLoader
          ClassLoader used
protected  java.lang.String eventReceiver
          The name of the RMI server that is going to receive the event.
protected  AdaptorServerRmi factory
          RMI reference to the remote managed object server (AdaptorServerRmi).
protected  java.util.Hashtable handles
          Cache of object handles already created by the adaptor.
protected  boolean isConnected
          Indicates if the client is connected to the managed object server.
protected  java.util.Hashtable listeners
          The list of event listeners.
protected  MapperSrvIf mapper
          Mapping service to use.
protected  com.sun.jaw.impl.adaptor.rmi.internal.EvtRcvClientImpl receiver
          The event receiver associated with the current adaptor client.
protected  java.lang.String serverHost
          Host name of the server.
protected  java.lang.String serverName
          Logical name of the server.
protected  int serverPort
          Port number of the server.
 
Constructor Summary
AdaptorClient()
          Constructs an adaptor client.
 
Method Summary
 ObjectName addListener(ManagedObject mo, java.util.EventListener listen, java.lang.String listenerType)
          Allows a listener for a managed object to be added.
 void cb_connect(ManagedObject cbean)
          Connect the C-bean to the adaptor.
 void cb_disconnect(ManagedObject cbean)
          Disconnect the C-bean from the adaptor.
 java.lang.Object cb_newDBMO(java.lang.String impl, ObjectName name, ModificationList list)
          Creates a persistent instance of a managed object in the remote object server.
 java.lang.Object cb_newDBMO(java.lang.String impl, ObjectName name, ModificationList list, ObjectName aLoader)
          Creates a persistent instance of a managed object in the remote object server.
 java.lang.Object cb_newMO(java.lang.String impl, ObjectName name, ModificationList list)
          Creates an instance of a managed object in the remote object server.
 java.lang.Object cb_newMO(java.lang.String impl, ObjectName name, ModificationList list, ObjectName aLoader)
          Creates an instance of a managed object in the remote object server.
 void connect(java.lang.Object context, java.lang.String host, int port, java.lang.String logicalName)
          Initializes the communication with a remote managed object server.
 void deleteMO(ObjectName name)
          Deletes an instance of a managed object in the remote object server.
 void disconnect()
          Terminates the communication with the remote managed object server.
 java.lang.String getAdaptorVersion()
          The method returns a string that represents the version of this JDMK adaptor.
 java.lang.ClassLoader getClassLoader()
          Get the class loader used to retrieve all MO and MOStub classes
static java.lang.String getClassVersion()
          Returns the version of this class.
 java.lang.String getDomain()
          Returns the name of the domain controlled by the managed object server.
 java.lang.Object getIndexedValue(ObjectName name, java.lang.String property, int pos)
          Allows the value of a specific indexed property within a managed object to be obtained.
 MapperSrvIf getMapperSrv()
          Gets the mapper used to derive the implementation name from an object name.
 java.util.Vector getObject(ObjectName name, QueryExp filter)
          Gets handles on managed objects controlled by the remote managed object server.
 ManagedObject getObjectFromCache(ObjectName name)
          Returns the local managed object associated with name.
 java.util.Vector getOnlyNames(ObjectName name, QueryExp query)
          Gets the names of managed objects controlled by the remote managed object server.
 java.lang.Object getValue(ObjectName name, java.lang.String property)
          Allows the value of a specific property within a managed object to be obtained.
 PropertyList getValues(ObjectName name, java.util.Vector propertyIdList)
          Allows the values of several properties within a managed object to be obtained.
 java.util.EventListener giveListener(ObjectName mo, ObjectName listener)
          Retrieves the the given listener associated to the managed object.
 java.lang.Object invokePerform(ObjectName objName, java.lang.String pfName, java.lang.Object[] params, java.lang.String[] signature)
          Allows any method to be applied to a remote object.
 java.lang.Boolean isConnected()
          Checks whether the managed object adaptor is connected to the remote managed object server.
 void newDBMO(java.lang.String impl, ObjectName name, ModificationList list)
          Creates a persistent instance of a managed object in the remote object server.
 void newDBMO(java.lang.String impl, ObjectName name, ModificationList list, ObjectName aLoader)
          Creates a persistent instance of a managed object in the remote object server.
 void newMO(java.lang.String impl, ObjectName name, ModificationList list)
          Creates an instance of a managed object in the remote object server.
 void newMO(java.lang.String impl, ObjectName name, ModificationList list, ObjectName aLoader)
          Creates an instance of a managed object in the remote object server.
 void newObj(java.lang.String className)
          Allows a Java object of a particular class to be instantiated in a remote managed object server.
 void newObj(java.lang.String className, ObjectName aLoader)
          Allows a Java object of a particular class to be instantiated in a remote managed object server.
 void removeListener(ManagedObject mo, ObjectName name)
          Allows a listener for a managed object to be removed.
 void setClassLoader(java.lang.ClassLoader loader)
          Allows to specify a class loader to retreive MO and MOStub classes
 java.lang.Object setIndexedValue(ObjectName name, java.lang.String id, java.lang.Object val, java.lang.String op, int pos)
          Sets the value of a specific indexed property of a named managed object.
 void setMapperSrv(MapperSrvIf mapper)
          Allows you to specify a mapper.
 int setup(java.lang.Object param)
          Returns always zero.
 java.lang.Object setValue(ObjectName name, java.lang.String id, java.lang.Object val, java.lang.String op)
          Sets the value of a specific property of a named managed object.
 PropertyList setValues(ObjectName name, ModificationList modif)
          Sets the value of several properties within a managed object.
 void transferObject(java.lang.Object object, ObjectName logicalName)
          Adds a named object under the control of the remote CMF.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

handles

protected transient java.util.Hashtable handles
Cache of object handles already created by the adaptor.

serverHost

protected java.lang.String serverHost
Host name of the server.

serverPort

protected int serverPort
Port number of the server.

serverName

protected java.lang.String serverName
Logical name of the server.

factory

protected transient AdaptorServerRmi factory
RMI reference to the remote managed object server (AdaptorServerRmi).

isConnected

protected transient boolean isConnected
Indicates if the client is connected to the managed object server.

classLoader

protected transient java.lang.ClassLoader classLoader
ClassLoader used

mapper

protected transient MapperSrvIf mapper
Mapping service to use.

receiver

protected transient com.sun.jaw.impl.adaptor.rmi.internal.EvtRcvClientImpl receiver
The event receiver associated with the current adaptor client.

listeners

protected transient java.util.Hashtable listeners
The list of event listeners.

eventReceiver

protected java.lang.String eventReceiver
The name of the RMI server that is going to receive the event.
Constructor Detail

AdaptorClient

public AdaptorClient()
Constructs an adaptor client.
Method Detail

setup

public int setup(java.lang.Object param)
Returns always zero. This AdaptorClient doesn't need a specific set up.
Specified by:
setup in interface AdaptorMO
Parameters:
param - Parameter to be set.
Returns:
always 0 (zero)

connect

public void connect(java.lang.Object context,
                    java.lang.String host,
                    int port,
                    java.lang.String logicalName)
             throws CommunicationException,
                    java.lang.SecurityException
Initializes the communication with a remote managed object server.
Specified by:
connect in interface AdaptorMO
Parameters:
context - Not used by the RMI adaptor.
host - The host name of the server.
port - The port number of the server.
logicalName - The logical name of the server.
Throws:
CommunicationException - A communications problem occurred.
java.lang.SecurityException - A security violation has occurred.

disconnect

public void disconnect()
Terminates the communication with the remote managed object server.
Specified by:
disconnect in interface AdaptorMO

isConnected

public java.lang.Boolean isConnected()
Checks whether the managed object adaptor is connected to the remote managed object server.
Specified by:
isConnected in interface AdaptorMO
Returns:
True if the managed object adaptor is connected, false otherwise.

getOnlyNames

public java.util.Vector getOnlyNames(ObjectName name,
                                     QueryExp query)
                              throws InstanceNotFoundException
Gets the names of managed objects controlled by the remote managed object server.

The method enables any of the following things be obtained:

When the class name and instance name are empty, it means that all the objects are to be selected (and filtered if a query is specified).
Specified by:
getOnlyNames in interface AdaptorMO
Parameters:
name - The names of the managed objects to be retrieved.
query - The query to be applied for selecting managed objects.
Returns:
A list containing the object names of the selected managed objects.
Throws:
InstanceNotFoundException - The m-bean does not exist in the repository.

getObject

public java.util.Vector getObject(ObjectName name,
                                  QueryExp filter)
                           throws LocalException,
                                  InstanceNotFoundException,
                                  java.lang.reflect.InvocationTargetException
Gets handles on managed objects controlled by the remote managed object server. The method enables any of the following things to be obtained:
Specified by:
getObject in interface AdaptorMO
Parameters:
name - The names of the managed objects to be retrieved.
filter - The filter to be applied for selecting managed objects.
Returns:
A list containing the selected managed objects.
Throws:
LocalException - An error has occurred on the client side.
InstanceNotFoundException - The m-bean does not exist in the repository.
java.lang.reflect.InvocationTargetException - An exception has been thrown by the user code on the remote agent. The exception is wrapped by the InvocationTargetException.

getValue

public java.lang.Object getValue(ObjectName name,
                                 java.lang.String property)
                          throws InstanceNotFoundException,
                                 PropertyNotFoundException,
                                 java.lang.reflect.InvocationTargetException
Allows the value of a specific property within a managed object to be obtained.
Specified by:
getValue in interface AdaptorMO
Parameters:
name - The name of the managed object from within which the property is to be retrieved.
property - The name of the property to be retrieved.
Returns:
The value of the retrieved property.
Throws:
InstanceNotFoundException - The m-bean does not exist in the repository.
PropertyNotFoundException - The specified property is not defined for the object.
java.lang.reflect.InvocationTargetException - It is a checked exception that wraps an exception thrown by an invoked method or constructor.

getIndexedValue

public java.lang.Object getIndexedValue(ObjectName name,
                                        java.lang.String property,
                                        int pos)
                                 throws InstanceNotFoundException,
                                        PropertyNotFoundException,
                                        java.lang.reflect.InvocationTargetException
Allows the value of a specific indexed property within a managed object to be obtained.
Specified by:
getIndexedValue in interface AdaptorMO
Parameters:
name - The name of the managed object from within which the property is to be retrieved.
property - The name of the property to be retrieved.
pos - The position in the index of the value to be retrieved.
Returns:
The value of the retrieved property.
Throws:
InstanceNotFoundException - The m-bean does not exist in the repository.
PropertyNotFoundException - The specified property is not defined for the object.
java.lang.reflect.InvocationTargetException - It is a checked exception that wraps an exception thrown by an invoked method or constructor.

getValues

public PropertyList getValues(ObjectName name,
                              java.util.Vector propertyIdList)
                       throws InstanceNotFoundException
Allows the values of several properties within a managed object to be obtained.
Specified by:
getValues in interface AdaptorMO
Parameters:
name - The names of the objects from within which the properties are to be retrieved.
propertyIdList - A list of the properties to be retrieved.
Returns:
The values of the retrieved properties.
Throws:
InstanceNotFoundException - The m-bean does not exist in the repository.
See Also:
PropertyList

setValue

public java.lang.Object setValue(ObjectName name,
                                 java.lang.String id,
                                 java.lang.Object val,
                                 java.lang.String op)
                          throws InstanceNotFoundException,
                                 java.lang.IllegalAccessException,
                                 PropertyNotFoundException,
                                 InvalidPropertyValueException,
                                 java.lang.ClassNotFoundException,
                                 java.lang.InstantiationException,
                                 java.lang.reflect.InvocationTargetException
Sets the value of a specific property of a named managed object. The managed object is identified by its object name.

Specified by:
setValue in interface AdaptorMO
Parameters:
name - The name of the object within which the property is to be set.
id - The property to be set.
val - The value that the property is to be set to.
op - The Java class name of the operator to be applied to the property. The class must implement the OperatorSrvIf interface.
Throws:
PropertyNotFoundException - The specified property does not exist or cannot be retrieved.
InvalidPropertyValueException - The specified value is not a valid value for the property.
InstanceNotFoundException - The m-bean does not exist in the repository.
java.lang.IllegalAccessException - The method has tried to access a class that is not public and in another package.
java.lang.ClassNotFoundException - The specified class could not be found.
java.lang.InstantiationException - A new instance of the specified class could not be created.
java.lang.reflect.InvocationTargetException - It is a checked exception that wraps an exception thrown by an invoked method or constructor.
See Also:
OperatorSrvIf

setIndexedValue

public java.lang.Object setIndexedValue(ObjectName name,
                                        java.lang.String id,
                                        java.lang.Object val,
                                        java.lang.String op,
                                        int pos)
                                 throws InstanceNotFoundException,
                                        java.lang.IllegalAccessException,
                                        PropertyNotFoundException,
                                        InvalidPropertyValueException,
                                        java.lang.ClassNotFoundException,
                                        java.lang.InstantiationException,
                                        java.lang.reflect.InvocationTargetException
Sets the value of a specific indexed property of a named managed object. The managed object is identified by its object name.

Specified by:
setIndexedValue in interface AdaptorMO
Parameters:
name - The name of the object within which the property is to be set.
id - The property to be set.
val - The value that the property is to be set to.
pos - The position in the index of the value to be set.
Throws:
PropertyNotFoundException - The specified property does not exist or cannot be retrieved.
InvalidPropertyValueException - The specified value is not a valid value for the property.
InstanceNotFoundException - The m-bean does not exist in the repository.
java.lang.IllegalAccessException - The method has tried to access a class that is not public and in another package.
java.lang.ClassNotFoundException - The specified class could not be found.
java.lang.InstantiationException - A new instance of the specified class could not be created.
java.lang.reflect.InvocationTargetException - It is a checked exception that wraps an exception thrown by an invoked method or constructor.

setValues

public PropertyList setValues(ObjectName name,
                              ModificationList modif)
                       throws InstanceNotFoundException,
                              java.lang.IllegalAccessException,
                              java.lang.reflect.InvocationTargetException
Sets the value of several properties within a managed object. The value must support the Serializable interface.
Specified by:
setValues in interface AdaptorMO
Parameters:
name - The name of the object within which the properties are to be set.
modif - A list of the properties to be set and the values to which they are to be set.
Returns:
The values of the properties that were set.
Throws:
InstanceNotFoundException - The m-bean does not exist in the repository.
java.lang.IllegalAccessException - The method has tried to access a class that is not public and in another package.
java.lang.reflect.InvocationTargetException - It is a checked exception that wraps an exception thrown by an invoked method or constructor.
See Also:
ModificationList

getObjectFromCache

public ManagedObject getObjectFromCache(ObjectName name)
Returns the local managed object associated with name.
Parameters:
name - The name of the local managed object to be accessed.
Returns:
The local object the name of which is name.

addListener

public ObjectName addListener(ManagedObject mo,
                              java.util.EventListener listen,
                              java.lang.String listenerType)
                       throws InstanceNotFoundException,
                              java.lang.IllegalAccessException,
                              java.lang.ClassNotFoundException,
                              java.lang.InstantiationException
Allows a listener for a managed object to be added. Transparently to the caller, the adaptor creates and registers a listener for the object within the managed object server. The managed object to be listened to is specified by the mo parameter. When the remote object fires an event by calling a method of the remote listener, the corresponding method in the local listener is called.
Specified by:
addListener in interface AdaptorMO
Parameters:
mo - The name of the managed object to be listened to.
listen - The listener to be added.
listenerType - Class name of the remote listener to be created.
Returns:
The name of the remote listener.
Throws:
InstanceNotFoundException - The object does not exist in the repository.
java.lang.IllegalAccessException - Access denied.
java.lang.ClassNotFoundException - The class to be instantiated could not be found by the class loader.
java.lang.InstantiationException - A new instance of the specified operator class could not be created.
See Also:
removeListener(com.sun.jaw.reference.client.mo.ManagedObject, com.sun.jaw.reference.common.ObjectName)

removeListener

public void removeListener(ManagedObject mo,
                           ObjectName name)
Allows a listener for a managed object to be removed.
Specified by:
removeListener in interface AdaptorMO
Parameters:
mo - The name of the managed object for which the listener was operating.
name - The name of the remote listener to be removed.

giveListener

public java.util.EventListener giveListener(ObjectName mo,
                                            ObjectName listener)
Retrieves the the given listener associated to the managed object.
Parameters:
mo - The name of the managed object for which the listener was operating.
name - The name of the remote listener to be retrieved.
Returns:
The event listener.

newObj

public void newObj(java.lang.String className)
            throws java.lang.IllegalAccessException,
                   java.lang.InstantiationException,
                   java.lang.ClassNotFoundException,
                   java.lang.reflect.InvocationTargetException
Allows a Java object of a particular class to be instantiated in a remote managed object server.
Specified by:
newObj in interface AdaptorMO
Parameters:
className - The Java class name of the object to be created.
Throws:
java.lang.IllegalAccessException - The method has tried to access a class that is not public and in another package.
java.lang.InstantiationException - A new instance of the specified class could not be created.
java.lang.ClassNotFoundException - The specified class could not be found.
java.lang.reflect.InvocationTargetException - It is a checked exception that wraps an exception thrown by an invoked method or constructor.

newMO

public void newMO(java.lang.String impl,
                  ObjectName name,
                  ModificationList list)
           throws java.lang.IllegalAccessException,
                  java.lang.ClassNotFoundException,
                  InstanceAlreadyExistException,
                  java.lang.InstantiationException,
                  java.lang.reflect.InvocationTargetException
Creates an instance of a managed object in the remote object server. When calling the method, you can optionally provide the class name of the Java implementation to be used for instantiating the new object.

Specified by:
newMO in interface AdaptorMO
Parameters:
impl - The name of the Java implementation to be used on the server.
name - The name of the managed object to be created.
list - The list of initial values of the properties of the new managed object.
Throws:
java.lang.ClassNotFoundException - The class to be instantiated could not be found by the class loader.
java.lang.InstantiationException - A new instance of the specified class could not be created.
java.lang.IllegalAccessException - The method has tried to access a class that is not public and in another package.
InstanceAlreadyExistException - The managed object is already registered in the repository.
java.lang.reflect.InvocationTargetException - It is a checked exception that wraps an exception thrown by an invoked method or constructor.

newDBMO

public void newDBMO(java.lang.String impl,
                    ObjectName name,
                    ModificationList list)
             throws java.lang.IllegalAccessException,
                    java.lang.ClassNotFoundException,
                    InstanceAlreadyExistException,
                    java.lang.InstantiationException,
                    java.lang.reflect.InvocationTargetException
Creates a persistent instance of a managed object in the remote object server. When calling the method, you can optionally provide the class name of the Java implementation to be used for instantiating the new object.

Specified by:
newDBMO in interface AdaptorMO
Parameters:
impl - The name of the Java implementation to be used on the server.
name - The name of the managed object to be created.
list - The list of initial values of the properties of the new managed object.
Throws:
java.lang.ClassNotFoundException - The class to be instantiated could not be found by the class loader.
java.lang.InstantiationException - A new instance of the specified class could not be created.
java.lang.IllegalAccessException - The method has tried to access a class that is not public and in another package.
InstanceAlreadyExistException - The managed object is already registered in the repository.
java.lang.reflect.InvocationTargetException - It is a checked exception that wraps an exception thrown by an invoked method or constructor.

cb_newMO

public java.lang.Object cb_newMO(java.lang.String impl,
                                 ObjectName name,
                                 ModificationList list)
                          throws java.lang.IllegalAccessException,
                                 java.lang.ClassNotFoundException,
                                 InstanceAlreadyExistException,
                                 java.lang.InstantiationException,
                                 LocalException,
                                 java.lang.reflect.InvocationTargetException
Creates an instance of a managed object in the remote object server. When calling the method, you can optionally provide the class name of the Java implementation to be used for instantiating the new object.

Specified by:
cb_newMO in interface AdaptorMO
Parameters:
impl - The name of the Java implementation to be used on the server.
name - The name of the managed object to be created.
list - The list of initial values of the properties of the new managed object.
Returns:
The newly created managed object.
Throws:
java.lang.ClassNotFoundException - The class to be instantiated could not be found by the class loader.
java.lang.InstantiationException - A new instance of the specified class could not be created.
java.lang.IllegalAccessException - The method has tried to access a class that is not public and in another package.
InstanceAlreadyExistException - The managed object is already registered in the repository.
LocalException - An error has occurred on the client side.
java.lang.reflect.InvocationTargetException - It is a checked exception that wraps an exception thrown by an invoked method or constructor.

cb_newDBMO

public java.lang.Object cb_newDBMO(java.lang.String impl,
                                   ObjectName name,
                                   ModificationList list)
                            throws java.lang.IllegalAccessException,
                                   java.lang.ClassNotFoundException,
                                   InstanceAlreadyExistException,
                                   java.lang.InstantiationException,
                                   LocalException,
                                   java.lang.reflect.InvocationTargetException
Creates a persistent instance of a managed object in the remote object server. When calling the method, you can optionally provide the class name of the Java implementation to be used for instantiating the new object.

Specified by:
cb_newDBMO in interface AdaptorMO
Parameters:
impl - The name of the Java implementation to be used on the server.
name - The name of the managed object to be created.
list - The list of initial values of the properties of the new managed object.
Returns:
The newly created managed object.
Throws:
java.lang.ClassNotFoundException - The class to be instantiated could not be found by the class loader.
java.lang.InstantiationException - A new instance of the specified class could not be created.
java.lang.IllegalAccessException - The method has tried to access a class that is not public and in another package.
InstanceAlreadyExistException - The managed object is already registered in the repository.
LocalException - An error has occurred on the client side.
java.lang.reflect.InvocationTargetException - It is a checked exception that wraps an exception thrown by an invoked method or constructor.

newObj

public void newObj(java.lang.String className,
                   ObjectName aLoader)
            throws java.lang.IllegalAccessException,
                   java.lang.InstantiationException,
                   java.lang.ClassNotFoundException,
                   java.lang.reflect.InvocationTargetException
Allows a Java object of a particular class to be instantiated in a remote managed object server.
Specified by:
newObj in interface AdaptorMO
Parameters:
className - The Java class name of the object to be created.
aLoader - The name of a class loader to be used.
Throws:
java.lang.IllegalAccessException - The method has tried to access a class that is not public and in another package.
java.lang.InstantiationException - A new instance of the specified class could not be created.
java.lang.ClassNotFoundException - The specified class could not be found.
java.lang.reflect.InvocationTargetException - It is a checked exception that wraps an exception thrown by an invoked method or constructor.

newMO

public void newMO(java.lang.String impl,
                  ObjectName name,
                  ModificationList list,
                  ObjectName aLoader)
           throws java.lang.IllegalAccessException,
                  java.lang.ClassNotFoundException,
                  InstanceAlreadyExistException,
                  java.lang.InstantiationException,
                  java.lang.reflect.InvocationTargetException
Creates an instance of a managed object in the remote object server. When calling the method, you can optionally provide the class name of the Java implementation to be used for instantiating the new object.

Specified by:
newMO in interface AdaptorMO
Parameters:
impl - The name of the Java implementation to be used on the server.
name - The name of the managed object to be created.
list - The list of initial values of the properties of the new managed object.
aLoader - The name of a class loader to be used.
Throws:
java.lang.ClassNotFoundException - The class to be instantiated could not be found by the class loader.
java.lang.InstantiationException - A new instance of the specified class could not be created.
java.lang.IllegalAccessException - The method has tried to access a class that is not public and in another package.
InstanceAlreadyExistException - The managed object is already registered in the repository.
java.lang.reflect.InvocationTargetException - It is a checked exception that wraps an exception thrown by an invoked method or constructor.

newDBMO

public void newDBMO(java.lang.String impl,
                    ObjectName name,
                    ModificationList list,
                    ObjectName aLoader)
             throws java.lang.IllegalAccessException,
                    java.lang.ClassNotFoundException,
                    InstanceAlreadyExistException,
                    java.lang.InstantiationException,
                    java.lang.reflect.InvocationTargetException
Creates a persistent instance of a managed object in the remote object server. When calling the method, you can optionally provide the class name of the Java implementation to be used for instantiating the new object.

Specified by:
newDBMO in interface AdaptorMO
Parameters:
impl - The name of the Java implementation to be used on the server.
name - The name of the managed object to be created.
list - The list of initial values of the properties of the new managed object.
aLoader - The name of a class loader to be used.
Throws:
java.lang.ClassNotFoundException - The class to be instantiated could not be found by the class loader.
java.lang.InstantiationException - A new instance of the specified class could not be created.
java.lang.IllegalAccessException - The method has tried to access a class that is not public and in another package.
InstanceAlreadyExistException - The managed object is already registered in the repository.
java.lang.reflect.InvocationTargetException - It is a checked exception that wraps an exception thrown by an invoked method or constructor.

cb_newMO

public java.lang.Object cb_newMO(java.lang.String impl,
                                 ObjectName name,
                                 ModificationList list,
                                 ObjectName aLoader)
                          throws java.lang.IllegalAccessException,
                                 java.lang.ClassNotFoundException,
                                 InstanceAlreadyExistException,
                                 java.lang.InstantiationException,
                                 LocalException,
                                 java.lang.reflect.InvocationTargetException
Creates an instance of a managed object in the remote object server. When calling the method, you can optionally provide the class name of the Java implementation to be used for instantiating the new object.

Specified by:
cb_newMO in interface AdaptorMO
Parameters:
impl - The name of the Java implementation to be used on the server.
name - The name of the managed object to be created.
list - The list of initial values of the properties of the new managed object.
aLoader - The name of a class loader to be used.
Returns:
The newly created managed object.
Throws:
java.lang.ClassNotFoundException - The class to be instantiated could not be found by the class loader.
java.lang.InstantiationException - A new instance of the specified class could not be created.
java.lang.IllegalAccessException - The method has tried to access a class that is not public and in another package.
InstanceAlreadyExistException - The managed object is already registered in the repository.
LocalException - An error has occurred on the client side.
java.lang.reflect.InvocationTargetException - It is a checked exception that wraps an exception thrown by an invoked method or constructor.

cb_newDBMO

public java.lang.Object cb_newDBMO(java.lang.String impl,
                                   ObjectName name,
                                   ModificationList list,
                                   ObjectName aLoader)
                            throws java.lang.IllegalAccessException,
                                   java.lang.ClassNotFoundException,
                                   InstanceAlreadyExistException,
                                   java.lang.InstantiationException,
                                   LocalException,
                                   java.lang.reflect.InvocationTargetException
Creates a persistent instance of a managed object in the remote object server. When calling the method, you can optionally provide the class name of the Java implementation to be used for instantiating the new object.

Specified by:
cb_newDBMO in interface AdaptorMO
Parameters:
impl - The name of the Java implementation to be used on the server.
name - The name of the managed object to be created.
list - The list of initial values of the properties of the new managed object.
aLoader - The name of a class loader to be used.
Returns:
The newly created managed object.
Throws:
java.lang.ClassNotFoundException - The class to be instantiated could not be found by the class loader.
java.lang.InstantiationException - A new instance of the specified class could not be created.
java.lang.IllegalAccessException - The method has tried to access a class that is not public and in another package.
InstanceAlreadyExistException - The managed object is already registered in the repository.
LocalException - An error has occurred on the client side.
java.lang.reflect.InvocationTargetException - It is a checked exception that wraps an exception thrown by an invoked method or constructor.

transferObject

public void transferObject(java.lang.Object object,
                           ObjectName logicalName)
                    throws InstanceAlreadyExistException
Adds a named object under the control of the remote CMF.

Use this method with care, because it moves an instance remotely. All methods of this instance are executed locally on the remote agent.

Specified by:
transferObject in interface AdaptorMO
Parameters:
object - The object to be added to the remote repository.
logicalName - The logical name of the object.
Throws:
InstanceAlreadyExistException - The managed object is already registered in the repository.

deleteMO

public void deleteMO(ObjectName name)
              throws InstanceNotFoundException,
                     java.lang.reflect.InvocationTargetException
Deletes an instance of a managed object in the remote object server.
Specified by:
deleteMO in interface AdaptorMO
Parameters:
name - The name of the managed object to be deleted.
Throws:
InstanceNotFoundException - The m-bean does not exist in the repository.
java.lang.reflect.InvocationTargetException - It is a checked exception that wraps an exception thrown by an invoked method or constructor.

invokePerform

public java.lang.Object invokePerform(ObjectName objName,
                                      java.lang.String pfName,
                                      java.lang.Object[] params,
                                      java.lang.String[] signature)
                               throws InstanceNotFoundException,
                                      java.lang.NoSuchMethodException,
                                      java.lang.reflect.InvocationTargetException,
                                      java.lang.IllegalAccessException
Allows any method to be applied to a remote object.
Specified by:
invokePerform in interface AdaptorMO
Parameters:
objName - The name of the remote object.
pfName - The name of the method to be applied.
params - An array containing the parameters to be passed to the method.
signature - The signature of the method to be called.
Returns:
The value of the method applied.
Throws:
InstanceNotFoundException - The object does not exist in the repository.
java.lang.NoSuchMethodException - The method specified is not defined.
java.lang.reflect.InvocationTargetException - It is a checked exception that wraps an exception thrown by an invoked method or constructor.
java.lang.IllegalAccessException - The method has tried to access a class that is not public and in another package.

cb_connect

public void cb_connect(ManagedObject cbean)
Connect the C-bean to the adaptor. If a C-bean with the same object name is already known by the adaptor, then the connection will fail.
Specified by:
cb_connect in interface AdaptorMO
Parameters:
cbean - The C-bean to be connected.
Throws:
CommunicationException - if the c-bean is already connected

cb_disconnect

public void cb_disconnect(ManagedObject cbean)
Disconnect the C-bean from the adaptor.
Specified by:
cb_disconnect in interface AdaptorMO
Parameters:
cbean - The C-bean to be disconnected.

getClassVersion

public static java.lang.String getClassVersion()
Returns the version of this class.
Returns:
String representing the version of this class.

getAdaptorVersion

public java.lang.String getAdaptorVersion()
The method returns a string that represents the version of this JDMK adaptor.
Specified by:
getAdaptorVersion in interface AdaptorMO
Returns:
a string representation of the version of this JDMK adaptor.

getDomain

public java.lang.String getDomain()
                           throws CommunicationException
Returns the name of the domain controlled by the managed object server.
Specified by:
getDomain in interface AdaptorMO
Throws:
CommunicationException - A communications problem occurred.

getClassLoader

public java.lang.ClassLoader getClassLoader()
Get the class loader used to retrieve all MO and MOStub classes
Specified by:
getClassLoader in interface AdaptorMO
Returns:
the ClassLoader used or null if it is the default loader

setClassLoader

public void setClassLoader(java.lang.ClassLoader loader)
Allows to specify a class loader to retreive MO and MOStub classes
Specified by:
setClassLoader in interface AdaptorMO
Parameters:
loader - the instance of ClassLoader

getMapperSrv

public MapperSrvIf getMapperSrv()
Gets the mapper used to derive the implementation name from an object name.
Specified by:
getMapperSrv in interface AdaptorMO
Returns:
The mapping service used or null if it is the default mapper.

setMapperSrv

public void setMapperSrv(MapperSrvIf mapper)
Allows you to specify a mapper.
Specified by:
setMapperSrv in interface AdaptorMO
Parameters:
mapper - The instance of mapping service to be used.