com.sun.jaw.impl.adaptor.rmi
Interface AdaptorServerRmi


public abstract interface AdaptorServerRmi
extends java.rmi.Remote

The AdaptorServerRmi class defines the remote method invocation (RMI) interface to be used by the RMI implementation of AdaptorClient class.


Method Summary
 ObjectName addListener(ObjectName mo, java.lang.String listen, java.lang.String receiver)
          Allows a listener for a managed object to be added.
 void addObject(java.lang.Object object, ObjectName logicalName)
          Adds a named object under the control of the remote CMF.
 void deleteMO(ObjectName name)
          Deletes an instance of a managed object in the remote object server.
 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.
 java.util.Vector getObject(ObjectName name, QueryExp query)
          Gets handles on 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.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.util.Vector newDBMO(java.lang.String impl, ObjectName name, ModificationList list)
          Creates a persistent instance of a managed object in the remote object server.
 java.util.Vector 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.util.Vector newMO(java.lang.String impl, ObjectName name, ModificationList list)
          Creates an instance of a managed object in the remote object server.
 java.util.Vector 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(ObjectName ref)
          Allows a listener for a managed object to be removed.
 java.lang.Object SetIndexedValue(ObjectName name, java.lang.String id, java.lang.Object value, java.lang.String op, int pos)
          Sets the value of a specific indexed property of a managed object.
 java.lang.Object SetValue(ObjectName name, java.lang.String id, java.lang.Object value, java.lang.String op)
          Sets the value of a specific property of a managed object.
 PropertyList setValues(ObjectName name, ModificationList modif)
          Sets the value of several properties within a managed object.
 

Method Detail

getObject

public java.util.Vector getObject(ObjectName name,
                                  QueryExp query)
                           throws java.rmi.RemoteException,
                                  InstanceNotFoundException,
                                  ServiceNotFoundException
Gets handles on managed objects controlled by the remote managed object server. The method enables any of the following things to be obtained: When the class name and the instance name are empty, it means that all the objects are to be selected (and filtered if a query is specified).
Parameters:
name - The name of the object to be retrieved.
query - The query to be applied for selecting managed objects.
Returns:
A list containing the selected managed objects.
Throws:
java.rmi.RemoteException - See java.rmi.RemoteException.
InstanceNotFoundException - The m-bean does not exist in the repository.
ServiceNotFoundException - The requested service is not supported.

getValue

public java.lang.Object getValue(ObjectName name,
                                 java.lang.String property)
                          throws java.rmi.RemoteException,
                                 InstanceNotFoundException,
                                 PropertyNotFoundException,
                                 java.lang.reflect.InvocationTargetException,
                                 ServiceNotFoundException
Allows the value of a specific property within a managed object to be obtained.
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:
java.rmi.RemoteException - See java.rmi.RemoteException.
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.
ServiceNotFoundException - The requested service is not supported.

getIndexedValue

public java.lang.Object getIndexedValue(ObjectName name,
                                        java.lang.String property,
                                        int pos)
                                 throws java.rmi.RemoteException,
                                        InstanceNotFoundException,
                                        PropertyNotFoundException,
                                        java.lang.reflect.InvocationTargetException,
                                        ServiceNotFoundException
Allows the value of a specific indexed property within a managed object to be obtained.
Parameters:
name - The name of the 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:
java.rmi.RemoteException - See java.rmi.RemoteException.
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.
ServiceNotFoundException - The requested service is not supported.

getValues

public PropertyList getValues(ObjectName name,
                              java.util.Vector propertyIdList)
                       throws InstanceNotFoundException,
                              java.rmi.RemoteException,
                              ServiceNotFoundException
Allows the values of several properties within a managed object to be obtained.
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.
java.rmi.RemoteException - See java.rmi.RemoteException.
ServiceNotFoundException - The requested service is not supported.

SetValue

public java.lang.Object SetValue(ObjectName name,
                                 java.lang.String id,
                                 java.lang.Object value,
                                 java.lang.String op)
                          throws InstanceNotFoundException,
                                 java.rmi.RemoteException,
                                 java.lang.reflect.InvocationTargetException,
                                 java.lang.IllegalAccessException,
                                 ServiceNotFoundException,
                                 PropertyNotFoundException,
                                 InvalidPropertyValueException,
                                 java.lang.InstantiationException,
                                 java.lang.ClassNotFoundException
Sets the value of a specific property of a managed object.

The value must support the Serializable interface.

Parameters:
name - The name of the object within which the property is to be set.
id - The property to be set.
value - 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.
Returns:
The value that the property has been set to.
Throws:
InstanceNotFoundException - The m-bean does not exist in the repository.
java.rmi.RemoteException - See java.rmi.RemoteException.
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.
ServiceNotFoundException - The requested service is not supported.
PropertyNotFoundException - The specified property is not defined for the object.
InvalidPropertyValueException - The value specified for a property is invalid.
java.lang.InstantiationException - A new instance of the specified class could not be created.
java.lang.ClassNotFoundException - The specified class could not be found.

SetIndexedValue

public java.lang.Object SetIndexedValue(ObjectName name,
                                        java.lang.String id,
                                        java.lang.Object value,
                                        java.lang.String op,
                                        int pos)
                                 throws InstanceNotFoundException,
                                        java.rmi.RemoteException,
                                        java.lang.reflect.InvocationTargetException,
                                        java.lang.IllegalAccessException,
                                        ServiceNotFoundException,
                                        PropertyNotFoundException,
                                        InvalidPropertyValueException,
                                        java.lang.InstantiationException,
                                        java.lang.ClassNotFoundException
Sets the value of a specific indexed property of a managed object.

The value must support the Serializable interface.

Parameters:
name - The name of the object within which the property is to be set.
id - The property to be set.
value - 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.
pos - The position in the index of the value to be set.
Returns:
The value that the property has been set to.
Throws:
InstanceNotFoundException - The m-bean does not exist in the repository.
java.rmi.RemoteException - See java.rmi.RemoteException.
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.
ServiceNotFoundException - The requested service is not supported.
PropertyNotFoundException - The specified property is not defined for the object.
InvalidPropertyValueException - The value specified for a property is invalid.
java.lang.InstantiationException - A new instance of the specified class could not be created.
java.lang.ClassNotFoundException - The specified class could not be found.

setValues

public PropertyList setValues(ObjectName name,
                              ModificationList modif)
                       throws InstanceNotFoundException,
                              java.rmi.RemoteException,
                              java.lang.reflect.InvocationTargetException,
                              ServiceNotFoundException
Sets the value of several properties within a managed object.

The value must support the Serializable interface.

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.rmi.RemoteException - See java.rmi.RemoteException.
java.lang.reflect.InvocationTargetException - It is a checked exception that wraps an exception thrown by an invoked method or constructor.
ServiceNotFoundException - The requested service is not supported.

getDomain

public java.lang.String getDomain()
                           throws java.rmi.RemoteException
Returns the name of the domain controlled by the managed object server.
Throws:
java.rmi.RemoteException - See java.rmi.RemoteException.

newObj

public void newObj(java.lang.String className)
            throws java.rmi.RemoteException,
                   java.lang.IllegalAccessException,
                   java.lang.InstantiationException,
                   java.lang.ClassNotFoundException,
                   ServiceNotFoundException,
                   java.lang.reflect.InvocationTargetException
Allows a Java object of a particular class to be instantiated in a remote managed object server.
Parameters:
className - The Java class name of the object to be created.
Throws:
java.rmi.RemoteException - See java.rmi.RemoteException.
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.
ServiceNotFoundException - The requested service is not supported.
java.lang.reflect.InvocationTargetException - It is a checked exception that wraps an exception thrown by an invoked method or constructor.

newMO

public java.util.Vector newMO(java.lang.String impl,
                              ObjectName name,
                              ModificationList list)
                       throws java.rmi.RemoteException,
                              java.lang.IllegalAccessException,
                              java.lang.ClassNotFoundException,
                              ServiceNotFoundException,
                              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.

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.rmi.RemoteException - See java.rmi.RemoteException.
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.
ServiceNotFoundException - The requested service is not supported.
InstanceAlreadyExistException - The m-bean is already registered in the repository.
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.

newDBMO

public java.util.Vector newDBMO(java.lang.String impl,
                                ObjectName name,
                                ModificationList list)
                         throws java.rmi.RemoteException,
                                java.lang.IllegalAccessException,
                                java.lang.ClassNotFoundException,
                                ServiceNotFoundException,
                                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.

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.rmi.RemoteException - See java.rmi.RemoteException.
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.
ServiceNotFoundException - The requested service is not supported.
InstanceAlreadyExistException - The m-bean is already registered in the repository.
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.

newObj

public void newObj(java.lang.String className,
                   ObjectName aLoader)
            throws java.rmi.RemoteException,
                   java.lang.IllegalAccessException,
                   java.lang.InstantiationException,
                   java.lang.ClassNotFoundException,
                   ServiceNotFoundException,
                   java.lang.reflect.InvocationTargetException
Allows a Java object of a particular class to be instantiated in a remote managed object server.
Parameters:
className - The Java class name of the object to be created.
aLoader - The name of a class loader to be used.
Throws:
java.rmi.RemoteException - See java.rmi.RemoteException.
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.
ServiceNotFoundException - The requested service is not supported.
java.lang.reflect.InvocationTargetException - It is a checked exception that wraps an exception thrown by an invoked method or constructor.

newMO

public java.util.Vector newMO(java.lang.String impl,
                              ObjectName name,
                              ModificationList list,
                              ObjectName aLoader)
                       throws java.rmi.RemoteException,
                              java.lang.IllegalAccessException,
                              java.lang.ClassNotFoundException,
                              ServiceNotFoundException,
                              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.
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.rmi.RemoteException - See java.rmi.RemoteException.
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.
ServiceNotFoundException - The requested service is not supported.
InstanceAlreadyExistException - The m-bean is already registered in the repository.
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.

newDBMO

public java.util.Vector newDBMO(java.lang.String impl,
                                ObjectName name,
                                ModificationList list,
                                ObjectName aLoader)
                         throws java.rmi.RemoteException,
                                java.lang.IllegalAccessException,
                                java.lang.ClassNotFoundException,
                                ServiceNotFoundException,
                                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.
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.rmi.RemoteException - See java.rmi.RemoteException.
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.
ServiceNotFoundException - The requested service is not supported.
InstanceAlreadyExistException - The m-bean is already registered in the repository.
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.

deleteMO

public void deleteMO(ObjectName name)
              throws java.rmi.RemoteException,
                     ServiceNotFoundException,
                     InstanceNotFoundException,
                     java.lang.reflect.InvocationTargetException
Deletes an instance of a managed object in the remote object server.
Parameters:
name - The name of the managed object to be deleted.
Throws:
java.rmi.RemoteException - See java.rmi.RemoteException.
ServiceNotFoundException - The requested service is not supported.
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.

addListener

public ObjectName addListener(ObjectName mo,
                              java.lang.String listen,
                              java.lang.String receiver)
                       throws InstanceNotFoundException,
                              java.rmi.RemoteException,
                              java.lang.IllegalAccessException,
                              ServiceNotFoundException,
                              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.
Parameters:
mo - The managed object to be listened to.
listen - The listener to be created in the agent.
receiver - The name of the receiver to be called for forwarding the event.
Returns:
A reference to the created listener.
Throws:
InstanceNotFoundException - The m-bean does not exist in the repository.
java.rmi.RemoteException - See java.rmi.RemoteException.
java.lang.IllegalAccessException - The method has tried to access a class that is not public and in another package.
ServiceNotFoundException - The requested service is not supported.
java.lang.ClassNotFoundException - The specified class could not be found.
java.lang.InstantiationException - A new instance of the specified class could not be created.

removeListener

public void removeListener(ObjectName ref)
                    throws java.rmi.RemoteException
Allows a listener for a managed object to be removed.
Parameters:
ref - The object name of the listener to be removed.
Throws:
java.rmi.RemoteException - See java.rmi.RemoteException.

invokePerform

public java.lang.Object invokePerform(ObjectName objName,
                                      java.lang.String pfName,
                                      java.lang.Object[] params,
                                      java.lang.String[] signature)
                               throws InstanceNotFoundException,
                                      java.rmi.RemoteException,
                                      java.lang.reflect.InvocationTargetException,
                                      ServiceNotFoundException,
                                      java.lang.NoSuchMethodException,
                                      java.lang.IllegalAccessException
Allows any method to be applied to a remote object.
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:
java.lang.IllegalAccessException - The method has tried to access a class that is not public and in another package.
InstanceNotFoundException - The object does not exist in the repository.
java.lang.NoSuchMethodException - The method specified is not defined.
ServiceNotFoundException - The requested service is not supported.
java.rmi.RemoteException - See java.rmi.RemoteException.
java.lang.reflect.InvocationTargetException - It is a checked exception that wraps an exception thrown by an invoked method or constructor.

addObject

public void addObject(java.lang.Object object,
                      ObjectName logicalName)
               throws ServiceNotFoundException,
                      InstanceAlreadyExistException,
                      java.rmi.RemoteException
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.

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.
ServiceNotFoundException - The requested service is not supported.
java.rmi.RemoteException - See java.rmi.RemoteException.