All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface com.sun.jaw.reference.client.adaptor.AdaptorMO

public interface AdaptorMO
extends Serializable
This interface provides a means for accessing remote objects in a manner that is independent of the communication protocol.

The interface defines methods for:

This interface enables you to implement synchronous and asynchronous modes of access to managed objects. However an implementation does not need to support both modes. When a mode is not supported, the implementation will return an exception.


Method Index

 o addListener(ManagedObject, EventListener, String)
Allows a listener for a managed object to be added.
 o cb_connect(ManagedObject)
Connect the C-bean to the adaptor.
 o cb_disconnect(ManagedObject)
Disconnect the C-bean from the adaptor.
 o cb_newDBMO(String, ObjectName, ModificationList)
Creates a persistent instance of a managed object in the remote object server.
 o cb_newDBMO(String, ObjectName, ModificationList, ObjectName)
Creates a persistent instance of a managed object in the remote object server.
 o cb_newMO(String, ObjectName, ModificationList)
Creates an instance of a managed object in the remote object server.
 o cb_newMO(String, ObjectName, ModificationList, ObjectName)
Creates an instance of a managed object in the remote object server.
 o connect(Object, String, int, String)
Initializes the communication with the remote managed object server.
 o deleteMO(ObjectName)
Deletes an instance of a managed object in the remote object server.
 o disconnect()
Terminates the communication with the remote managed object server.
 o getAdaptorVersion()
The method returns a string that represents the version of this JDMK adaptor.
 o getClassLoader()
Gets the class loader used locally to retreive all MO and MOStub classes.
 o getDomain()
Allows the domain name of a server to be accessed.
 o getIndexedValue(ObjectName, String, int)
Allows the value of a specific indexed property within a managed object to be obtained.
 o getMapperSrv()
Gets the mapper used to derive the implementation name from an object name.
 o getObject(ObjectName, QueryExp)
Gets handles on managed objects controlled by the remote managed object server.
 o getOnlyNames(ObjectName, QueryExp)
Gets the names of managed objects controlled by the remote managed object server.
 o getValue(ObjectName, String)
Allows the value of a specific property within a managed object to be obtained.
 o getValues(ObjectName, Vector)
Allows the values of several properties within a managed object to be obtained.
 o invokePerform(ObjectName, String, Object[], String[])
Allows any method to be applied to a remote object.
 o isConnected()
Checks whether the adaptor is connected.
 o newDBMO(String, ObjectName, ModificationList)
Creates a persistent instance of a managed object in the remote object server.
 o newDBMO(String, ObjectName, ModificationList, ObjectName)
Creates a persistent instance of a managed object in the remote object server.
 o newMO(String, ObjectName, ModificationList)
Creates an instance of a managed object in the remote object server.
 o newMO(String, ObjectName, ModificationList, ObjectName)
Creates an instance of a managed object in the remote object server.
 o newObj(String)
Allows a Java object of a particular class to be instantiated in a remote managed object server.
 o newObj(String, ObjectName)
Allows a Java object of a particular class to be instantiated in a remote managed object server.
 o removeListener(ManagedObject, ObjectName)
Allows a listener for a managed object to be removed.
 o setClassLoader(ClassLoader)
Allows you to specify a class loader to retrieve MO and MOStub classes.
 o setIndexedValue(ObjectName, String, Object, String, int)
Allows the value of a specific indexed property within an object to be set.
 o setMapperSrv(MapperSrvIf)
Allows you to specify a mapper.
 o setup(Object)
Configures the adaptor.
 o setValue(ObjectName, String, Object, String)
Allows the value of a specific property within an object to be set.
 o setValues(ObjectName, ModificationList)
Allows the values of several properties within an object to be set.
 o transferObject(Object, ObjectName)
Adds a named object under the control of the remote CMF.

Methods

 o setup
 public abstract int setup(Object param)
Configures the adaptor.

Parameters:
param - Parameters to be set.
 o connect
 public abstract void connect(Object context,
                              String host,
                              int port,
                              String logicalName)
Initializes the communication with the remote managed object server.

Parameters:
context - A context for the adaptor.
host - The host name of the server.
port - The port number of the server.
logicalName - The logical name of the server.
Returns:
The list of selected managed objects.

See Also:
disconnect
 o disconnect
 public abstract void disconnect()
Terminates the communication with the remote managed object server.

See Also:
connect
 o isConnected
 public abstract Boolean isConnected()
Checks whether the adaptor is connected.

Returns:
True if the adaptor is connected, false otherwise.
 o getAdaptorVersion
 public abstract String getAdaptorVersion()
The method returns a string that represents the version of this JDMK adaptor.

Returns:
a string representation of the version of this JDMK adaptor.
 o getDomain
 public abstract String getDomain()
Allows the domain name of a server to be accessed.

Returns:
The domain name of the server.
 o getClassLoader
 public abstract ClassLoader getClassLoader()
Gets the class loader used locally to retreive all MO and MOStub classes.

Returns:
The ClassLoader used or null if it is the default loader.
 o setClassLoader
 public abstract void setClassLoader(ClassLoader loader)
Allows you to specify a class loader to retrieve MO and MOStub classes.

Parameters:
loader - the instance of ClassLoader.
 o getMapperSrv
 public abstract MapperSrvIf getMapperSrv()
Gets the mapper used to derive the implementation name from an object name.

Returns:
The mapping service used or null if it is the default mapper.
 o setMapperSrv
 public abstract void setMapperSrv(MapperSrvIf mapper)
Allows you to specify a mapper.

Parameters:
mapper - The instance of mapping service to be used.
 o getOnlyNames
 public abstract 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 be to 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).

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 specified object does not exist in the repository.
 o newMO
 public abstract void newMO(String impl,
                            ObjectName name,
                            ModificationList list) throws IllegalAccessException, ClassNotFoundException, InstanceAlreadyExistException, InstantiationException, 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.
Throws: ClassNotFoundException
The class to be instantiated could not be found by the class loader.
Throws: InstantiationException
A new instance of the specified class could not be created.
Throws: IllegalAccessException
Access denied.
Throws: InstanceAlreadyExistException
The managed object is already registered in the repository.
Throws: InvocationTargetException
The exception contains the real exception emitted by the method of the remote m-bean.
 o newDBMO
 public abstract void newDBMO(String impl,
                              ObjectName name,
                              ModificationList list) throws IllegalAccessException, ClassNotFoundException, InstanceAlreadyExistException, InstantiationException, 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.
Throws: ClassNotFoundException
The class to be instantiated could not be found by the class loader.
Throws: InstantiationException
A new instance of the specified class could not be created.
Throws: IllegalAccessException
Access denied.
Throws: InstanceAlreadyExistException
The managed object is already registered in the repository.
Throws: InvocationTargetException
The exception contains the real exception emitted by the method of the remote m-bean.
 o newMO
 public abstract void newMO(String impl,
                            ObjectName name,
                            ModificationList list,
                            ObjectName aLoader) throws IllegalAccessException, ClassNotFoundException, InstanceAlreadyExistException, InstantiationException, 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.
Throws: ClassNotFoundException
The class to be instantiated could not be found by the class loader.
Throws: InstantiationException
A new instance of the specified class could not be created.
Throws: IllegalAccessException
Access denied.
Throws: InstanceAlreadyExistException
object The managed object is already registered in the repository.
Throws: InvocationTargetException
The exception contains the real exception emitted by the method of the remote m-bean.
 o newDBMO
 public abstract void newDBMO(String impl,
                              ObjectName name,
                              ModificationList list,
                              ObjectName aLoader) throws IllegalAccessException, ClassNotFoundException, InstanceAlreadyExistException, InstantiationException, 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 on the server to be used.
name - The name of the managed object to be created.
listThe - list of initial values of the properties of the new managed object.
aLoader - The name of the class loader to be used.
Throws: ClassNotFoundException
The class to be instantiated could not be found by the class loader.
Throws: InstantiationException
A new instance of the specified class could not be created.
Throws: IllegalAccessException
Access denied.
Throws: InstanceAlreadyExistException
The managed object is already registered in the repository.
Throws: InvocationTargetException
The exception contains the real exception emitted by the method of the remote m-bean.
 o newObj
 public abstract void newObj(String className) throws IllegalAccessException, InstantiationException, ClassNotFoundException, 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: ClassNotFoundException
The class to be instantiated could not be found by the class loader.
Throws: IllegalAccessException
Access denied.
Throws: InstantiationException
A new instance of the specified class could not be created.
Throws: InvocationTargetException
The exception contains the real exception emitted by the method of the remote m-bean.
 o newObj
 public abstract void newObj(String className,
                             ObjectName aLoader) throws IllegalAccessException, InstantiationException, ClassNotFoundException, 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 the class loader to be used.
Throws: IllegalAccessException
Access denied.
Throws: InstantiationException
A new instance of the specified class could not be created.
Throws: ClassNotFoundException
The class to be instantiated could not be found by the class loader.
Throws: InvocationTargetException
The exception contains the real exception emitted by the method of the remote m-bean.
 o deleteMO
 public abstract void deleteMO(ObjectName name) throws InstanceNotFoundException, 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: InstanceNotFoundException
The object does not exist in the repository.
Throws: InvocationTargetException
The exception contains the real exception emitted by the method of the remote m-bean.
 o getValue
 public abstract Object getValue(ObjectName name,
                                 String property) throws InstanceNotFoundException, PropertyNotFoundException, InvocationTargetException
Allows the value of a specific property within a managed object to be obtained.

Parameters:
name - The name of the managed object from 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 object does not exist in the repository.
Throws: PropertyNotFoundException
The requested property is not supported by the managed object.
Throws: InvocationTargetException
The exception contains the real exception emitted by the method of the remote m-bean.
 o getIndexedValue
 public abstract Object getIndexedValue(ObjectName name,
                                        String property,
                                        int pos) throws InstanceNotFoundException, PropertyNotFoundException, InvocationTargetException
Allows the value of a specific indexed property within a managed object to be obtained.

Parameters:
name - The name of the object from which the property is to be retrieved.
property - The name of the property to be retrieved.
position - The position in the index of the value to be retrieved.
Returns:
The value of the retrieved property.
Throws: InstanceNotFoundException
The object does not exist in the repository.
Throws: PropertyNotFoundException
The requested property is not supported by the managed object.
Throws: InvocationTargetException
The exception contains the real exception emitted by the method of the remote m-bean..
 o getValues
 public abstract PropertyList getValues(ObjectName name,
                                        Vector propertyIdList) throws InstanceNotFoundException
Allows the values of several properties within a managed object to be obtained.

Parameters:
name - The name of the object from 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 object does not exist in the repository.
 o setValue
 public abstract Object setValue(ObjectName name,
                                 String prop,
                                 Object value,
                                 String op) throws InstanceNotFoundException, IllegalAccessException, PropertyNotFoundException, InvalidPropertyValueException, ClassNotFoundException, InstantiationException, InvocationTargetException
Allows the value of a specific property within an object to be set. The value must support the Serializable interface.

Parameters:
name - The name of the object within which the property is to be set.
prop - The name of 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 of the retrieved property.
Throws: InstanceNotFoundException
The object does not exist in the repository.
Throws: PropertyNotFoundException
The requested property is not supported by the managed object.
Throws: InvalidPropertyValueException
The specified value is not a valid value for the property.
Throws: ClassNotFoundException
The class to be instantiated could not be found by the class loader.
Throws: InstantiationException
A new instance of the specified operator class could not be created.
Throws: InvocationTargetException
The exception contains the real exception emitted by the method of the remote m-bean.
 o setIndexedValue
 public abstract Object setIndexedValue(ObjectName name,
                                        String prop,
                                        Object value,
                                        String op,
                                        int position) throws InstanceNotFoundException, IllegalAccessException, PropertyNotFoundException, InvalidPropertyValueException, ClassNotFoundException, InstantiationException, InvocationTargetException
Allows the value of a specific indexed property within an object to be set. The value must support the Serializable interface.

Parameters:
name - The name of the object within which the property is to be set.
prop - The name of 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.
position - The position in the index of the value to be set.
Returns:
The value of the retrieved property.
Throws: InstanceNotFoundException
The object does not exist in the repository.
Throws: IllegalAccessException
Access denied.
Throws: PropertyNotFoundException
The requested property is not supported by the managed object.
Throws: InvalidPropertyValueException
The specified value is not a valid value for the property.
Throws: ClassNotFoundException
The class to be instantiated could not be found by the class loader.
Throws: InstantiationException
A new instance of the specified operator class could not be created.
Throws: InvocationTargetException
The exception contains the real exception emitted by the method of the remote m-bean.
 o setValues
 public abstract PropertyList setValues(ObjectName name,
                                        ModificationList modif) throws InstanceNotFoundException, IllegalAccessException, InvocationTargetException
Allows the values of several properties within an object to be set. 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 object does not exist in the repository.
Throws: IllegalAccessException
Access denied.
Throws: InvocationTargetException
The exception contains the real exception emitted by the method of the remote m-bean.
 o transferObject
 public abstract void transferObject(Object object,
                                     ObjectName logicalName) throws InstanceAlreadyExistException, InvocationTargetException
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 on the remote agent.

Parameters:
object - The object to be added to the remote repository.
logicalName - The logical name of the object.
Throws: IllegalAccessException
Access denied.
Throws: InstanceAlreadyExistException
The managed object is already registered in the repository.
Throws: InvocationTargetException
The exception contains the real exception emitted by the method of the remote m-bean.
 o invokePerform
 public abstract Object invokePerform(ObjectName objName,
                                      String pfname,
                                      Object params[],
                                      String signature[]) throws InstanceNotFoundException, NoSuchMethodException, InvocationTargetException, 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 called method.
Throws: InstanceNotFoundException
The object does not exist in the repository.
Throws: NoSuchMethodException
The method specified is not defined.
Throws: InvocationTargetException
The exception contains the real exception emitted by the method of the remote m-bean.
Throws: IllegalAccessException
Access denied.
 o getObject
 public abstract Vector getObject(ObjectName name,
                                  QueryExp query) throws InstanceNotFoundException, LocalException, InvocationTargetException
Gets handles on managed objects controlled by the remote managed object server. The method enables any of the following be to 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).

The method attemps to instantiate the c-bean associated to each managed object: if one of the instantiation fails (because the c-bean class is not accessible), the method returns a ClassNotFoundException wrapped in a LocalException.

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 selected managed objects.
Throws: InstanceNotFoundException
The specified object does not exist in the repository.
Throws: LocalException
A local problem occurred and is described by embedded exception.
Throws: InvocationTargetException
The exception contains the real exception emitted by the method of the remote m-bean.
 o cb_newMO
 public abstract Object cb_newMO(String impl,
                                 ObjectName name,
                                 ModificationList list) throws IllegalAccessException, ClassNotFoundException, InstanceAlreadyExistException, InstantiationException, LocalException, 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: ClassNotFoundException
The class to be instantiated could not be found by the class loader.
Throws: InstantiationException
A new instance of the specified class could not be created.
Throws: IllegalAccessException
Access denied.
Throws: InstanceAlreadyExistException
The managed object is already registered in the repository.
Throws: LocalException
A local problem occurred and is described by the embedded exception.
Throws: InvocationTargetException
The exception contains the real exception emitted by the method of the remote m-bean.
 o cb_newDBMO
 public abstract Object cb_newDBMO(String impl,
                                   ObjectName name,
                                   ModificationList list) throws IllegalAccessException, ClassNotFoundException, InstanceAlreadyExistException, InstantiationException, LocalException, 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: ClassNotFoundException
The class to be instantiated could not be found by the class loader.
Throws: InstantiationException
A new instance of the specified class could not be created.
Throws: IllegalAccessException
Access denied.
Throws: InstanceAlreadyExistException
The managed object is already registered in the repository.
Throws: LocalException
A local problem occurred and is described by the embedded exception.
Throws: InvocationTargetException
The exception contains the real exception emitted by the method of the remote m-bean.
 o cb_newMO
 public abstract Object cb_newMO(String impl,
                                 ObjectName name,
                                 ModificationList list,
                                 ObjectName aLoader) throws IllegalAccessException, ClassNotFoundException, InstanceAlreadyExistException, InstantiationException, LocalException, 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 the class loader to be used.
Returns:
The newly created managed object.
Throws: ClassNotFoundException
The class to be instantiated could not be found by the class loader.
Throws: InstantiationException
A new instance of the specified class could not be created.
Throws: IllegalAccessException
Access denied.
Throws: InstanceAlreadyExistException
object The managed object is already registered in the repository.
Throws: LocalException
A local problem occurred and is described by the embedded exception.
Throws: InvocationTargetException
The exception contains the real exception emitted by the method of the remote m-bean.
 o cb_newDBMO
 public abstract Object cb_newDBMO(String impl,
                                   ObjectName name,
                                   ModificationList list,
                                   ObjectName aLoader) throws IllegalAccessException, ClassNotFoundException, InstanceAlreadyExistException, InstantiationException, LocalException, 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 on the server to be used.
name - The name of the managed object to be created.
listThe - list of initial values of the properties of the new managed object.
aLoader - The name of the class loader to be used.
Returns:
The newly created managed object.
Throws: ClassNotFoundException
The class to be instantiated could not be found by the class loader.
Throws: InstantiationException
A new instance of the specified class could not be created.
Throws: IllegalAccessException
Access denied.
Throws: InstanceAlreadyExistException
The managed object is already registered in the repository.
Throws: LocalException
A local problem occurred and is described by the embedded exception.
Throws: InvocationTargetException
The exception contains the real exception emitted by the method of the remote m-bean.
 o addListener
 public abstract ObjectName addListener(ManagedObject mo,
                                        EventListener listen,
                                        String name) throws InstanceNotFoundException, IllegalAccessException, InstantiationException, ClassNotFoundException, TooManyListenersException
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 name of the managed object to be listened to.
listen - The listener to be added.
name - Class name of the remote listener to be created.
Returns:
The object name of the remote listener associated to the local listener.
Throws: InstanceNotFoundException
The object does not exist in the repository.
Throws: IllegalAccessException
Access denied.
Throws: ClassNotFoundException
The class to be instantiated could not be found by the class loader.
Throws: InstantiationException
A new instance of the specified operator class could not be created.
Throws: TooManyListenersException
Too many listeners have been added.

See Also:
removeListener
 o removeListener
 public abstract void removeListener(ManagedObject mo,
                                     ObjectName listenerName)
Allows a listener for a managed object to be removed.

Parameters:
mo - The name of the managed object for which the listener was operating.
listenerName - The name of the remote listener to be removed.

See Also:
addListener
 o cb_connect
 public abstract 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.

Parameters:
cbean - The C-bean to be connected.
 o cb_disconnect
 public abstract void cb_disconnect(ManagedObject cbean)
Disconnect the C-bean from the adaptor.

Parameters:
cbean - The C-bean to be disconnected.

All Packages  Class Hierarchy  This Package  Previous  Next  Index