All Packages Class Hierarchy This Package Previous Next Index
Class com.sun.jaw.impl.adaptor.comm.AdaptorClient
java.lang.Object
|
+----com.sun.jaw.impl.adaptor.comm.AdaptorClient
- public abstract class AdaptorClient
- extends Object
- implements AdaptorMO, Serializable
The AdaptorClient class provides an implementation of the
AdaptorMO
interface based on the HTTP protocol.
Querying a Java Dynamic Management agent with the HTTP adaptor implies that an instance of
AdaptorServerImpl
is running on the remote Java Dynamic Management agent.
In order to identify the Java Dynamic Management agent the adaptor needs to communicate with,
the method connect needs to be invoked.
It is possible to request the use of a specific proxy. To do so, once the
object is instantiated, you need to call the setup
method with a string containing the hostname and optionally a port number.
By default the port 80 will be used.
- See Also:
- AdaptorMO, AdaptorServerImpl
-
AdaptorClient()
- Constructs an adaptor client.
-
addListener(ManagedObject, EventListener, String)
- Allows a listener for a managed object to be added.
-
cb_connect(ManagedObject)
- Connects the c-bean to the adaptor.
-
cb_disconnect(ManagedObject)
- Disconnects the c-bean from the adaptor.
-
cb_newDBMO(String, ObjectName, ModificationList)
- Creates a persistent instance of a managed object in the remote Managed Object Server.
-
cb_newDBMO(String, ObjectName, ModificationList, ObjectName)
- Creates a persistent instance of a managed object in the remote Managed Object Server.
-
cb_newMO(String, ObjectName, ModificationList)
- Creates an instance of a managed object in the remote Managed Object Server.
-
cb_newMO(String, ObjectName, ModificationList, ObjectName)
- Creates an instance of a managed object in the remote Managed Object Server.
-
connect(Object, String, int, String)
- Initializes the communication with the remote Managed Object Server.
-
deleteMO(ObjectName)
- Deletes an instance of a managed object in the remote Managed Object Server.
-
disconnect()
- Terminates the communication with the remote Managed Object Server.
-
doConnect(String, int, AdaptorSocket)
-
-
doSend(String, byte[], AdaptorSocket)
-
-
getAdaptorVersion()
- The method returns a string that represents the version of this JDMK adaptor.
-
getClassLoader()
- Gets the classloader used to retrieve all MO and MOStub classes.
-
getClassVersion()
- Returns the version of this class.
-
getClientVersion()
- The method returns a string that represents the version of this JDMK client.
-
getDomain()
- Allows to access the domain name of a server
-
getIndexedValue(ObjectName, String, int)
- The method allows to obtain the value of a specific indexed property
within an object.
-
getMapperSrv()
- Gets the mapper service.
-
getObject(ObjectName, QueryExp)
- Get handles on managed objects controlled by the remote Managed Object Server.
-
getObjectFromCache(ObjectName)
- Returns the local managed object associated with name.
-
getOnlyNames(ObjectName, QueryExp)
- Get names on managed objects controlled by the remote Managed Object Server.
-
getServerVersion()
- The method returns a string that represents the version of the JDMK
server connected to.
-
getTimeoutMilliSeconds()
- Returns setting for TIMEOUT.
-
getValue(ObjectName, String)
- The method allows to obtain the value of a specific property within
an object.
-
getValues(ObjectName, Vector)
- The method allows to obtain the value of a set of properties within an object.
-
giveListener(ObjectName, ObjectName)
-
-
invokePerform(ObjectName, String, Object[], String[])
- Allows any method to be applied to a remote object.
-
isConnected()
- Allows to check whether or not the adaptor is connected
-
newDBMO(String, ObjectName, ModificationList)
- Creates a persistent instance of a managed object in the remote Managed Object Server.
-
newDBMO(String, ObjectName, ModificationList, ObjectName)
- Creates a persistent instance of a managed object in the remote Managed Object Server.
-
newMO(String, ObjectName, ModificationList)
- Creates an instance of a managed object in the remote Managed Object Server.
-
newMO(String, ObjectName, ModificationList, ObjectName)
- Creates a new instance of a managed object in the remote Managed Object Server.
-
newObj(String)
- The method allows to instantiate a Java object of a particular
class in a remote Managed Object Server.
-
newObj(String, ObjectName)
- The method allows to instantiate a Java object of a particular
class in a remote Managed Object Server.
-
removeListener(ManagedObject, ObjectName)
- The method allows to remove a listener on a managed object.
-
setClassLoader(ClassLoader)
- Allows to specify a classloader to retrieve MO and MOStub classes.
-
setIndexedValue(ObjectName, String, Object, String, int)
- The method allows to set the value of a specific indexed property within an object.
-
setMapperSrv(MapperSrvIf)
- Allows to specify the mapper service.
-
setTimeoutMilliSeconds(int)
-
Enable/disable TIMEOUT with the specified timeout, in milliseconds.
-
setup(Object)
- The method is used here to specify the use of an HTTP proxy.
-
setValue(ObjectName, String, Object, String)
- The method allows to set the value of a specific property within an object.
-
setValues(ObjectName, ModificationList)
- The method allows to set the value of several properties within an object.
-
transferObject(Object, ObjectName)
- Adds a named object under the control of the remote CMF.
AdaptorClient
public AdaptorClient()
- Constructs an adaptor client.
doConnect
public void doConnect(String serverName,
int serverPort,
AdaptorSocket sckt) throws UnknownHostException, IOException, CommunicationException
- Throws: UnknownHostException
- The IP address of the specified host could not be determined.
- Throws: IOException
- Signals that an I/O exception of some sort has occurred.
- Throws: CommunicationException
- A communications problem occurred.
doSend
public void doSend(String header,
byte content[],
AdaptorSocket sckt) throws IOException
- Throws: IOException
- Signals that an I/O exception of some sort has occurred.
getAdaptorVersion
public String getAdaptorVersion()
- The method returns a string that represents the version of this JDMK adaptor.
Note: returns the same information as getClientVersion()
- Returns:
- a string representation of the version of this JDMK adaptor.
- See Also:
- getClientVersion
getClientVersion
public String getClientVersion()
- The method returns a string that represents the version of this JDMK client.
- Returns:
- a string representation of the version of this JDMK client.
getServerVersion
public String getServerVersion()
- The method returns a string that represents the version of the JDMK
server connected to.
- Returns:
- a string representation of the verion of the JDMK server.
- Throws: CommunicationException
- if there is a communication problem with the remote Managed Object Server.
setup
public int setup(Object param)
- The method is used here to specify the use of an HTTP proxy.
- Parameters:
- param - A
String object containing the
hostname and port number of the proxy (for instance sky:80).
- Returns:
- negative if the setup fails.
connect
public void connect(Object context,
String host,
int port,
String logicalName)
- Initializes the communication with the remote Managed Object Server.
- Parameters:
- context - used to provide the client's authentication info.
- host - host name of the server
- port - port number of the server
- logicalName - logical name of the server
- Throws: CommunicationException
- if there is a communication problem with the remote Managed Object Server.
- Throws: IllegalAccessException
- if managed objects cannot be accessed in the remote Managed Object Server.
- Throws: UnauthorizedSecurityException
- if the server cannot authenticate the client because the to client's
authentication info is invalid.
disconnect
public void disconnect()
- Terminates the communication with the remote Managed Object Server.
isConnected
public Boolean isConnected()
- Allows to check whether or not the adaptor is connected
- Returns:
- true if connected, false otherwise.
getDomain
public String getDomain()
- Allows to access the domain name of a server
- Returns:
- the server's domain name.
- Throws: CommunicationException
- if there is a communication problem with the remote Managed Object Server.
getClassLoader
public ClassLoader getClassLoader()
- Gets the classloader used to retrieve all MO and MOStub classes.
- Returns:
- the classloader used or null if it is the default loader.
setClassLoader
public void setClassLoader(ClassLoader loader)
- Allows to specify a classloader to retrieve MO and MOStub classes.
- Parameters:
- loader - the classloader to be used.
getMapperSrv
public MapperSrvIf getMapperSrv()
- Gets the mapper service.
- Returns:
- the mapper service used.
setMapperSrv
public void setMapperSrv(MapperSrvIf mapper)
- Allows to specify the mapper service.
- Parameters:
- mapper - the mapper service to be used.
getOnlyNames
public Vector getOnlyNames(ObjectName name,
QueryExp query) throws InstanceNotFoundException
- Get names on managed objects controlled by the remote Managed Object Server.
The method allows to obtain all the names of managed objects, a subset
through a query, or a specific instance.
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 - name of the object(s) to retrieve.
- query - query to apply when selecting objects.
- Returns:
- The list of object names corresponding to the selected objects.
- Throws: InstanceNotFoundException
- if the instance of name could not be found in the remote Managed Object Server.
- Throws: CommunicationException
- if there is a communication problem with the remote Managed Object Server.
- Throws: IllegalAccessException
- if managed objects cannot be accessed in the remote Managed Object Server.
- Throws: ServiceNotFoundException
- if the requested service is not supported.
- Throws: ClassNotFoundException
- if the class to be instantiated could not be found by the classloader.
newMO
public void newMO(String impl,
ObjectName name,
ModificationList list) throws IllegalAccessException, ClassNotFoundException, InstanceAlreadyExistException, InstantiationException, InvocationTargetException
- Creates an instance of a managed object in the remote Managed 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 for the properties in the new managed object.
- Throws: CommunicationException
- if there is a communication problem with the remote Managed Object Server.
- Throws: IllegalAccessException
- if managed objects cannot be accessed in the remote Managed Object Server.
- Throws: ClassNotFoundException
- if the class to be instantiated could not be found by the classloader.
- Throws: ServiceNotFoundException
- if the requested service is not supported.
- Throws: InstanceAlreadyExistException
- if the managed object is already registered in the repository.
- Throws: InstantiationException
- if a new instance of the specified class could not be created.
- Throws: InvocationTargetException
- It is a checked exception that wraps an exception thrown by an invoked method or constructor.
newDBMO
public 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 Managed 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 for the properties in the new managed object.
- Throws: CommunicationException
- if there is a communication problem with the remote Managed Object Server.
- Throws: IllegalAccessException
- if managed objects cannot be accessed in the remote Managed Object Server.
- Throws: ClassNotFoundException
- if the class to be instantiated could not be found by the classloader.
- Throws: ServiceNotFoundException
- if the requested service is not supported.
- Throws: InstanceAlreadyExistException
- if the managed object is already registered in the repository.
- Throws: InstantiationException
- if a new instance of the specified class could not be created.
- Throws: InvocationTargetException
- It is a checked exception that wraps an exception thrown by an invoked method or constructor.
newMO
public void newMO(String impl,
ObjectName name,
ModificationList list,
ObjectName aLoader) throws IllegalAccessException, ClassNotFoundException, InstanceAlreadyExistException, InstantiationException, InvocationTargetException
- Creates a new instance of a managed object in the remote Managed Object Server.
When calling the method, the class name of the Java implementation to
use for instantiating the new object can be provided.
- Parameters:
- impl - name of the Java implementation to use on server side.
- name - name of the object to be created.
- list - initialization list for the properties.
- aLoader - name of a classloader to use.
- Throws: CommunicationException
- if there is a communication problem with the remote Managed Object Server.
- Throws: IllegalAccessException
- if managed objects cannot be accessed in the remote Managed Object Server.
- Throws: ClassNotFoundException
- if the class to be instantiated could not be found by the classloader.
- Throws: ServiceNotFoundException
- if the requested service is not supported.
- Throws: InstanceAlreadyExistException
- if the managed object is already registered in the repository.
- Throws: InstantiationException
- if a new instance of the specified class could not be created.
- Throws: InvocationTargetException
- It is a checked exception that wraps an exception thrown by an invoked method or constructor.
newDBMO
public 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 Managed 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 for the properties in the new managed object.
- Loader - The classloader to use.
- Throws: CommunicationException
- if there is a communication problem with the remote Managed Object Server.
- Throws: IllegalAccessException
- if managed objects cannot be accessed in the remote Managed Object Server.
- Throws: ClassNotFoundException
- if the class to be instantiated could not be found by the classloader.
- Throws: ServiceNotFoundException
- if the requested service is not supported.
- Throws: InstanceAlreadyExistException
- if the managed object is already registered in the repository.
- Throws: InstantiationException
- if a new instance of the specified class could not be created.
- Throws: InvocationTargetException
- It is a checked exception that wraps an exception thrown by an invoked method or constructor.
newObj
public void newObj(String className) throws IllegalAccessException, InstantiationException, ClassNotFoundException, InvocationTargetException
- The method allows to instantiate a Java object of a particular
class in a remote Managed Object Server.
- Parameters:
- className - Java classname of the object to be created.
- Throws: CommunicationException
- if there is a communication problem with the remote Managed Object Server.
- Throws: IllegalAccessException
- if managed objects cannot be accessed in the remote Managed Object Server.
- Throws: ClassNotFoundException
- if the class to be instantiated could not be found by the classloader.
- Throws: ServiceNotFoundException
- if the requested service is not supported.
- Throws: InstantiationException
- if a new instance of the specified class could not be created.
- Throws: InvocationTargetException
- It is a checked exception that wraps an exception thrown by an invoked method or constructor.
newObj
public void newObj(String className,
ObjectName aLoader) throws IllegalAccessException, InstantiationException, ClassNotFoundException, InvocationTargetException
- The method allows to instantiate a Java object of a particular
class in a remote Managed Object Server.
- Parameters:
- className - Java classname of the object to create.
- aLoader - the name of a classloader to use.
- Throws: CommunicationException
- if there is a communication problem with the remote Managed Object Server.
- Throws: IllegalAccessException
- if managed objects cannot be accessed in the remote Managed Object Server.
- Throws: ClassNotFoundException
- if the class to be instantiated could not be found by the classloader.
- Throws: ServiceNotFoundException
- if the requested service is not supported.
- Throws: InstantiationException
- if a new instance of the specified class could not be created.
- Throws: InvocationTargetException
- It is a checked exception that wraps an exception thrown by an invoked method or constructor.
deleteMO
public void deleteMO(ObjectName name) throws InstanceNotFoundException, InvocationTargetException
- Deletes an instance of a managed object in the remote Managed Object Server.
- Parameters:
- name - the name of the object to be deleted.
- Throws: CommunicationException
- if there is a communication problem with the remote Managed Object Server.
- Throws: IllegalAccessException
- if managed objects cannot be accessed in the remote Managed Object Server.
- Throws: ServiceNotFoundException
- if the requested service is not supported.
- Throws: InstanceNotFoundException
- if the instance of name cannot be found in the remote Managed Object Server.
- Throws: InvocationTargetException
- It is a checked exception that wraps an exception thrown by an invoked method or constructor.
getValue
public Object getValue(ObjectName name,
String property) throws InstanceNotFoundException, PropertyNotFoundException, InvocationTargetException
- The method allows to obtain the value of a specific property within
an object.
- Parameters:
- name - name of the object(s) to retrieve
- property - name of the property to retrieve
- Returns:
- The value of the retrieved property.
- Throws: InstanceNotFoundException
- if the instance of name cannot be found in the remote Managed Object Server.
- Throws: CommunicationException
- if there is a communication problem with the remote Managed Object Server.
- Throws: IllegalAccessException
- if managed objects cannot be accessed in the remote Managed Object Server.
- Throws: PropertyNotFoundException
- if the property is not found on this object.
- Throws: InvocationTargetException
- It is a checked exception that wraps an exception thrown by an invoked method or constructor.
getIndexedValue
public Object getIndexedValue(ObjectName name,
String property,
int pos) throws InstanceNotFoundException, PropertyNotFoundException, InvocationTargetException
- The method allows to obtain the value of a specific indexed property
within an object.
- Parameters:
- name - name of the object(s) to retrieve
- property - name of the property to retrieve
- pos - position of the value to retrieve
- Returns:
- The value of the retrieved property.
- Throws: InstanceNotFoundException
- if the instance of name cannot be found in the remote Managed Object Server.
- Throws: CommunicationException
- if there is a communication problem with the remote Managed Object Server.
- Throws: IllegalAccessException
- if managed objects cannot be accessed in the remote Managed Object Server.
- Throws: ServiceNotFoundException
- if the requested service is not supported.
- Throws: PropertyNotFoundException
- if the property is not found in this object.
- Throws: InvocationTargetException
- It is a checked exception that wraps an exception thrown by an invoked method or constructor.
getValues
public PropertyList getValues(ObjectName name,
Vector propertyIdList) throws InstanceNotFoundException
- The method allows to obtain the value of a set of properties within an object.
- Parameters:
- name - name of the object(s) to retrieve
- propertyIdList - list of properties to retrieve
- Returns:
- The value of retrieved properties.
- Throws: InstanceNotFoundException
- if the instance of name could not be found in the remote Managed Object Server.
- Throws: CommunicationException
- if there is a communication problem with the remote Managed Object Server.
- Throws: IllegalAccessException
- if managed objects cannot be accessed in the remote Managed Object Server.
- Throws: ServiceNotFoundException
- if the requested service is not supported.
setValue
public Object setValue(ObjectName name,
String prop,
Object value,
String op) throws InstanceNotFoundException, IllegalAccessException, PropertyNotFoundException, InvalidPropertyValueException, ClassNotFoundException, InstantiationException, InvocationTargetException
- The method allows to set the value of a specific property within an object.
The value must support the Serializable interface.
- Parameters:
- name - name of the object
- property - name of the property to set
- value - new value for the property
- Returns:
- The value of the retrieved property.
- Throws: InstanceNotFoundException
- if the instance of name could not be found in the remote Managed Object Server.
- Throws: CommunicationException
- if there is a communication problem with the remote Managed Object Server.
- Throws: IllegalAccessException
- if managed objects cannot be accessed in the remote Managed Object Server.
- Throws: ServiceNotFoundException
- if the requested service is not supported.
- Throws: PropertyNotFoundException
- if the property is not found in this object.
- Throws: InvalidPropertyValueException
- if the value specified for the property is invalid.
- Throws: ClassNotFoundException
- if the class to be instantiated could not be found by the classloader.
- Throws: InstantiationException
- if a new instance of the specified class could not be created.
- Throws: InvocationTargetException
- It is a checked exception that wraps an exception thrown by an invoked method or constructor.
setIndexedValue
public Object setIndexedValue(ObjectName name,
String prop,
Object value,
String op,
int pos) throws InstanceNotFoundException, IllegalAccessException, PropertyNotFoundException, InvalidPropertyValueException, ClassNotFoundException, InstantiationException, InvocationTargetException
- The method allows to set the value of a specific indexed property within an object.
The value must support the Serializable interface.
- Parameters:
- name - name of the object
- property - name of the property to set
- value - new value for the property
- pos - position of the value to retrieve
- Returns:
- The value of the retrieved property.
- Throws: InstanceNotFoundException
- if the instance of name could not be found in the remote Managed Object Server.
- Throws: CommunicationException
- if there is a communication problem with the remote Managed Object Server.
- Throws: IllegalAccessException
- if managed objects cannot be accessed in the remote Managed Object Server.
- Throws: ServiceNotFoundException
- if the requested service is not supported.
- Throws: PropertyNotFoundException
- if the property is not found in this object.
- Throws: InvalidPropertyValueException
- if the value specified for the property is invalid.
- Throws: ClassNotFoundException
- if the class to be instantiated could not be found by the classloader.
- Throws: InstantiationException
- if a new instance of the specified class could not be created.
- Throws: 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, IllegalAccessException, InvocationTargetException
- The method allows to set the value of several properties within an object.
The value must support the Serializable interface.
- Parameters:
- name - name of the object
- ModificationList - the list of modifications
- Returns:
- The values of the properties that were set.
- Throws: InstanceNotFoundException
- if the instance of name could not be found in the remote Managed Object Server.
- Throws: CommunicationException
- if there is a communication problem with the remote Managed Object Server.
- Throws: IllegalAccessException
- if managed objects cannot be accessed in the remote Managed Object Server.
- Throws: InvocationTargetException
- It is a checked exception that wraps an exception thrown by an invoked method or constructor.
transferObject
public void transferObject(Object object,
ObjectName name) 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: CommunicationException
- if there is a communication problem with the remote Managed Object Server.
- Throws: IllegalAccessException
- if managed objects cannot be accessed in the remote Managed Object Server.
- Throws: ServiceNotFoundException
- if the requested service is not supported.
- Throws: InstanceAlreadyExistException
- if the managed object is already registered in the repository.
- Throws: InvocationTargetException
- It is a checked exception that wraps an exception thrown by an invoked method or constructor.
invokePerform
public Object invokePerform(ObjectName objName,
String pfName,
Object params[],
String sig[]) 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: CommunicationException
- if there is a communication problem with the remote Managed Object Server.
- Throws: IllegalAccessException
- if managed objects cannot be accessed in the remote Managed Object Server.
- Throws: InstanceNotFoundException
- if the instance of name could not be found in the remote Managed Object Server.
- Throws: NoSuchMethodException
- The specified method could not be found.
- Throws: InvocationTargetException
- It is a checked exception that wraps an exception thrown by an invoked method or constructor.
getObject
public Vector getObject(ObjectName name,
QueryExp query) throws InstanceNotFoundException, LocalException, InvocationTargetException
- Get handles on managed objects controlled by the remote Managed Object Server.
The method allows to obtain all the managed objects, a subset through a query,
or a specific instance.
When 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 - name of the object(s) to retrieve.
- query - query to apply when selecting objects.
- Returns:
- The list of selected managed objects.
- Throws: InstanceNotFoundException
- if the instance of name could not be found in the remote Managed Object Server.
- Throws: CommunicationException
- if there is a communication problem with the remote Managed Object Server.
- Throws: IllegalAccessException
- if managed objects cannot be accessed in the remote Managed Object Server.
- Throws: ServiceNotFoundException
- if the requested service is not supported.
- Throws: LocalException
- if an exception occurs locally.
- Throws: InvocationTargetException
- It is a checked exception that wraps an exception thrown by an invoked method or constructor.
cb_newMO
public 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 Managed 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 for the properties in the new managed object.
- Returns:
- The newly created managed object.
- Throws: CommunicationException
- if there is a communication problem with the remote Managed Object Server.
- Throws: IllegalAccessException
- if managed objects cannot be accessed in the remote Managed Object Server.
- Throws: ClassNotFoundException
- if the class to be instantiated could not be found by the classloader.
- Throws: ServiceNotFoundException
- if the requested service is not supported.
- Throws: InstanceAlreadyExistException
- if the managed object is already registered in the repository.
- Throws: InstantiationException
- if a new instance of the specified class could not be created.
- Throws: LocalException
- if an exception occurs locally.
- Throws: InvocationTargetException
- It is a checked exception that wraps an exception thrown by an invoked method or constructor.
cb_newDBMO
public 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 Managed 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 for the properties in the new managed object.
- Returns:
- The newly created managed object.
- Throws: CommunicationException
- if there is a communication problem with the remote Managed Object Server.
- Throws: IllegalAccessException
- if managed objects cannot be accessed in the remote Managed Object Server.
- Throws: ClassNotFoundException
- if the class to be instantiated could not be found by the classloader.
- Throws: ServiceNotFoundException
- if the requested service is not supported.
- Throws: InstanceAlreadyExistException
- if the managed object is already registered in the repository.
- Throws: InstantiationException
- if a new instance of the specified class could not be created.
- Throws: LocalException
- if an exception occurs locally.
- Throws: InvocationTargetException
- It is a checked exception that wraps an exception thrown by an invoked method or constructor.
cb_newMO
public 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 Managed 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 classloader to use.
- Returns:
- The newly created managed object.
- Throws: CommunicationException
- if there is a communication problem with the remote Managed Object Server.
- Throws: IllegalAccessException
- if managed objects cannot be accessed in the remote Managed Object Server.
- Throws: ClassNotFoundException
- if the class to be instantiated could not be found by the classloader.
- Throws: ServiceNotFoundException
- if the requested service is not supported.
- Throws: InstanceAlreadyExistException
- if the managed object is already registered in the repository.
- Throws: InstantiationException
- if a new instance of the specified class could not be created.
- Throws: LocalException
- if an exception occurs locally.
- Throws: InvocationTargetException
- It is a checked exception that wraps an exception thrown by an invoked method or constructor.
cb_newDBMO
public 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 Managed 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 classloader to use.
- Returns:
- The newly created managed object.
- Throws: CommunicationException
- if there is a communication problem with the remote Managed Object Server.
- Throws: IllegalAccessException
- if managed objects cannot be accessed in the remote Managed Object Server.
- Throws: ClassNotFoundException
- if the class to be instantiated could not be found by the classloader.
- Throws: ServiceNotFoundException
- if the requested service is not supported.
- Throws: InstanceAlreadyExistException
- if the managed object is already registered in the repository.
- Throws: InstantiationException
- if a new instance of the specified class could not be created.
- Throws: LocalException
- if an exception occurs locally.
- Throws: InvocationTargetException
- It is a checked exception that wraps an exception thrown by an invoked method or constructor.
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,
EventListener listen,
String listenerType) 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.
- listenerType - Class name of the remote listener to be created.
- Returns:
- The name of the remote listener.
- Throws: InstanceNotFoundException
- if the instance of name could not be found in the remote Managed Object Server.
- Throws: CommunicationException
- if there is a communication problem with the remote Managed Object Server.
- Throws: IllegalAccessException
- if managed objects cannot be accessed in the remote Managed Object Server.
- Throws: ServiceNotFoundException
- if the requested service is not supported.
- Throws: ClassNotFoundException
- if the class to be instantiated could not be found by the classloader.
- Throws: InstantiationException
- if a new instance of the specified class could not be created.
- Throws: TooManyListenersException
- An attempt has been made to register more than one listener on this event source.
- See Also:
- removeListener
removeListener
public void removeListener(ManagedObject mo,
ObjectName listenerName)
- The method allows to remove a listener on a managed object.
- Parameters:
- mo - name of the mo for which the listener was operating
- listenerName - name of the remote listener to remove
giveListener
public EventListener giveListener(ObjectName mo,
ObjectName listener)
cb_connect
public void cb_connect(ManagedObject cbean)
- Connects 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 connect.
- Throws: CommunicationException
- if there is a communication problem with the remote Managed Object Server.
- Throws: IllegalAccessException
- if managed objects cannot be accessed in the remote Managed Object Server.
- Throws: ServiceNotFoundException
- if the requested service is not supported.
cb_disconnect
public void cb_disconnect(ManagedObject cbean)
- Disconnects the c-bean from the adaptor.
- Parameters:
- cbean - the c-bean to disconnect.
- Throws: CommunicationException
- if there is a communication problem with the remote Managed Object Server.
- Throws: IllegalAccessException
- if managed objects cannot be accessed in the remote Managed Object Server.
- Throws: ServiceNotFoundException
- if the requested service is not supported.
getClassVersion
public static String getClassVersion()
- Returns the version of this class.
getTimeoutMilliSeconds
public int getTimeoutMilliSeconds()
- Returns setting for TIMEOUT.
0 returns implies that the option is disabled
(i.e., timeout of infinity).
- Returns:
- the current value of the "Timeout" property.
setTimeoutMilliSeconds
public void setTimeoutMilliSeconds(int timeoutmsecs)
- Enable/disable TIMEOUT with the specified timeout, in milliseconds.
With this option set to a non-zero timeout, a read() call on the InputStream
associated with this Socket will block for only this amount of time. If the
timeout expires, a java.io.InterruptedIOException is raised, though the Socket
is still valid. The option must be enabled prior to entering the blocking
operation to have effect. The timeout must be > 0. A timeout of zero is
interpreted as an infinite timeout.
- Parameters:
- value - the new value of the property.
All Packages Class Hierarchy This Package Previous Next Index