com.sun.jaw.impl.adaptor.comm
Class AdaptorClient
java.lang.Object
|
+--com.sun.jaw.impl.adaptor.comm.AdaptorClient
- Direct Known Subclasses:
- AdaptorClient, AdaptorClient, AdaptorClient
- public abstract class AdaptorClient
- extends java.lang.Object
- implements AdaptorMO, java.io.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.
The following port numbers are used by default:
- 8081 for HTTP/TCP adaptor
- 8083 for HTTP/UDP adaptor
- 8084 for HTTP/SSL adaptor
- See Also:
AdaptorMO
,
AdaptorServerImpl
, Serialized Form
Constructor Summary |
AdaptorClient()
Constructs an adaptor client. |
Method Summary |
void |
cb_connect(ManagedObject cbean)
Connects the c-bean to the adaptor. |
void |
cb_disconnect(ManagedObject cbean)
Disconnects the c-bean from the adaptor. |
java.lang.Object |
cb_newDBMO(java.lang.String impl,
ObjectName name,
ModificationList list)
Creates a persistent instance of a managed object in the remote Managed Object Server. |
java.lang.Object |
cb_newDBMO(java.lang.String impl,
ObjectName name,
ModificationList list,
ObjectName aLoader)
Creates a persistent instance of a managed object in the remote Managed Object Server. |
java.lang.Object |
cb_newMO(java.lang.String impl,
ObjectName name,
ModificationList list)
Creates an instance of a managed object in the remote Managed Object Server. |
java.lang.Object |
cb_newMO(java.lang.String impl,
ObjectName name,
ModificationList list,
ObjectName aLoader)
Creates an instance of a managed object in the remote Managed Object Server. |
void |
connect(java.lang.Object context,
java.lang.String host,
int port,
java.lang.String logicalName)
Initializes the communication with the remote Managed Object Server. |
void |
deleteMO(ObjectName name)
Deletes an instance of a managed object in the remote Managed Object Server. |
void |
disconnect()
Terminates the communication with the remote Managed Object Server. |
java.lang.String |
getAdaptorVersion()
Gets a string that represents the version of this adaptor. |
java.lang.ClassLoader |
getClassLoader()
Gets the classloader used to retrieve all MO and MOStub classes. |
static java.lang.String |
getClassVersion()
Gets the version of this class. |
java.lang.String |
getClientVersion()
Gets a string that represents the version of this client. |
java.lang.String |
getDomain()
Allows to access the domain name of a server. |
java.lang.Object |
getIndexedValue(ObjectName name,
java.lang.String property,
int pos)
Allows to obtain the value of a specific indexed property
within an object. |
MapperSrvIf |
getMapperSrv()
Gets the mapper service. |
java.util.Vector |
getObject(ObjectName name,
QueryExp query)
Gets handles on managed objects controlled by the remote Managed Object Server. |
ManagedObject |
getObjectFromCache(ObjectName name)
Gets the local managed object associated with name. |
java.util.Vector |
getOnlyNames(ObjectName name,
QueryExp query)
Gets names on managed objects controlled by the remote Managed Object Server. |
java.lang.String |
getServerVersion()
Gets a string that represents the version of the server connected to. |
int |
getTimeoutMilliSeconds()
Gets setting for Timeout. |
java.lang.Object |
getValue(ObjectName name,
java.lang.String property)
Allows to obtain the value of a specific property within
an object. |
PropertyList |
getValues(ObjectName name,
java.util.Vector propertyIdList)
Allows to obtain the value of a set of properties within an object. |
java.lang.Object |
invokePerform(ObjectName objName,
java.lang.String pfName,
java.lang.Object[] params,
java.lang.String[] sig)
Allows any method to be applied to a remote object. |
java.lang.Boolean |
isConnected()
Allows to check whether or not the adaptor is connected. |
void |
newDBMO(java.lang.String impl,
ObjectName name,
ModificationList list)
Creates a persistent instance of a managed object in the remote Managed Object Server. |
void |
newDBMO(java.lang.String impl,
ObjectName name,
ModificationList list,
ObjectName aLoader)
Creates a persistent instance of a managed object in the remote Managed Object Server. |
void |
newMO(java.lang.String impl,
ObjectName name,
ModificationList list)
Creates an instance of a managed object in the remote Managed Object Server. |
void |
newMO(java.lang.String impl,
ObjectName name,
ModificationList list,
ObjectName aLoader)
Creates a new instance of a managed object in the remote Managed Object Server. |
void |
newObj(java.lang.String className)
Allows to instantiate a Java object of a particular
class in a remote Managed Object Server. |
void |
newObj(java.lang.String className,
ObjectName aLoader)
Allows to instantiate a Java object of a particular
class in a remote Managed Object Server. |
void |
setClassLoader(java.lang.ClassLoader loader)
Allows to specify a classloader to retrieve MO and MOStub classes. |
java.lang.Object |
setIndexedValue(ObjectName name,
java.lang.String prop,
java.lang.Object value,
java.lang.String op,
int pos)
Allows to set the value of a specific indexed property within an object. |
void |
setMapperSrv(MapperSrvIf mapper)
Allows to specify the mapper service. |
void |
setTimeoutMilliSeconds(int timeoutmsecs)
Enables/disables Timeout with the specified timeout, in milliseconds. |
int |
setup(java.lang.Object param)
This method is used to specify the use of an HTTP proxy. |
java.lang.Object |
setValue(ObjectName name,
java.lang.String prop,
java.lang.Object value,
java.lang.String op)
Allows to set the value of a specific property within an object. |
PropertyList |
setValues(ObjectName name,
ModificationList modif)
Allows to set the value of several properties within an object. |
void |
transferObject(java.lang.Object object,
ObjectName name)
Adds a named object under the control of the remote framework. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
AdaptorClient
public AdaptorClient()
- Constructs an adaptor client.
getAdaptorVersion
public java.lang.String getAdaptorVersion()
- Gets a string that represents the version of this adaptor.
Note: returns the same information as getClientVersion.
- Specified by:
- getAdaptorVersion in interface AdaptorMO
- Returns:
- A string representation of the version of this jdmk adaptor.
- See Also:
getClientVersion()
getClientVersion
public java.lang.String getClientVersion()
- Gets a string that represents the version of this client.
- Returns:
- A string representation of the version of this jdmk client.
getServerVersion
public java.lang.String getServerVersion()
- Gets a string that represents the version of the server connected to.
- Returns:
- A string representation of the version of the jdmk server.
- Throws:
- CommunicationException - If there is a communication problem with the remote Managed Object Server.
setup
public int setup(java.lang.Object param)
- This method is used to specify the use of an HTTP proxy.
The default port number used is 8081.
Example:
aclient.setup("sky");
is identical to
aclient.setup("sky:8081");
- Specified by:
- setup in interface AdaptorMO
- Parameters:
param
- A String
object containing the
host name and port number of the proxy (for instance sky:8081).- Returns:
- Negative if the setup fails.
connect
public void connect(java.lang.Object context,
java.lang.String host,
int port,
java.lang.String logicalName)
- Initializes the communication with the remote Managed Object Server.
- Specified by:
- connect in interface AdaptorMO
- 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.
- 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.
- Specified by:
- disconnect in interface AdaptorMO
isConnected
public java.lang.Boolean isConnected()
- Allows to check whether or not the adaptor is connected.
- Specified by:
- isConnected in interface AdaptorMO
- Returns:
- True if connected, false otherwise.
getDomain
public java.lang.String getDomain()
- Allows to access the domain name of a server.
- Specified by:
- getDomain in interface AdaptorMO
- Returns:
- The server's domain name.
- Throws:
- CommunicationException - If there is a communication problem with the remote Managed Object Server.
getClassLoader
public java.lang.ClassLoader getClassLoader()
- Gets the
classloader
used to retrieve all MO and MOStub classes.
- Specified by:
- getClassLoader in interface AdaptorMO
- Returns:
- The classloader used or null if it is the default loader.
setClassLoader
public void setClassLoader(java.lang.ClassLoader loader)
- Allows to specify a
classloader
to retrieve MO and MOStub classes.
- Specified by:
- setClassLoader in interface AdaptorMO
- Parameters:
loader
- The classloader to be used.
getMapperSrv
public MapperSrvIf getMapperSrv()
- Gets the mapper service.
- Specified by:
- getMapperSrv in interface AdaptorMO
- Returns:
- The mapper service used.
setMapperSrv
public void setMapperSrv(MapperSrvIf mapper)
- Allows to specify the mapper service.
- Specified by:
- setMapperSrv in interface AdaptorMO
- Parameters:
mapper
- The mapper service to be used.
getOnlyNames
public java.util.Vector getOnlyNames(ObjectName name,
QueryExp query)
throws InstanceNotFoundException
- Gets 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).
- Specified by:
- getOnlyNames in interface AdaptorMO
- Parameters:
name
- The name of the object(s) to retrieve.query
- The 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.
- CommunicationException - If there is a communication problem with the remote Managed Object Server.
- ServiceNotFoundException - If the requested service is not supported.
newMO
public void newMO(java.lang.String impl,
ObjectName name,
ModificationList list)
throws java.lang.IllegalAccessException,
java.lang.ClassNotFoundException,
InstanceAlreadyExistException,
java.lang.InstantiationException,
java.lang.reflect.InvocationTargetException
- Creates an instance of a managed object in the remote 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.
- Specified by:
- newMO in interface AdaptorMO
- Parameters:
impl
- The name of the Java implementation to be used on the server.name
- The name of the managed object to be created.list
- The list of initial values for the properties in the new managed object.- Throws:
- CommunicationException - If there is a communication problem with the remote Managed Object Server.
- java.lang.IllegalAccessException - If managed objects cannot be accessed in the remote Managed Object Server.
- java.lang.ClassNotFoundException - If the class to be instantiated could not be found by the classloader.
- ServiceNotFoundException - If the requested service is not supported.
- InstanceAlreadyExistException - If the managed object is already registered in the repository.
- java.lang.InstantiationException - If 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 void newDBMO(java.lang.String impl,
ObjectName name,
ModificationList list)
throws java.lang.IllegalAccessException,
java.lang.ClassNotFoundException,
InstanceAlreadyExistException,
java.lang.InstantiationException,
java.lang.reflect.InvocationTargetException
- Creates a persistent instance of a managed object in the remote 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.
- Specified by:
- newDBMO in interface AdaptorMO
- Parameters:
impl
- The name of the Java implementation to be used on the server.name
- The name of the managed object to be created.list
- The list of initial values for the properties in the new managed object.- Throws:
- CommunicationException - If there is a communication problem with the remote Managed Object Server.
- java.lang.IllegalAccessException - If managed objects cannot be accessed in the remote Managed Object Server.
- java.lang.ClassNotFoundException - If the class to be instantiated could not be found by the classloader.
- ServiceNotFoundException - If the requested service is not supported.
- InstanceAlreadyExistException - If the managed object is already registered in the repository.
- java.lang.InstantiationException - If 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.
newMO
public void newMO(java.lang.String impl,
ObjectName name,
ModificationList list,
ObjectName aLoader)
throws java.lang.IllegalAccessException,
java.lang.ClassNotFoundException,
InstanceAlreadyExistException,
java.lang.InstantiationException,
java.lang.reflect.InvocationTargetException
- Creates 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.
- Specified by:
- newMO in interface AdaptorMO
- Parameters:
impl
- The name of the Java implementation to use on server side.name
- The name of the object to be created.list
- The initialization list for the properties.aLoader
- The name of a classloader to use.- Throws:
- CommunicationException - If there is a communication problem with the remote Managed Object Server.
- java.lang.IllegalAccessException - If managed objects cannot be accessed in the remote Managed Object Server.
- java.lang.ClassNotFoundException - If the class to be instantiated could not be found by the classloader.
- ServiceNotFoundException - If the requested service is not supported.
- InstanceAlreadyExistException - If the managed object is already registered in the repository.
- java.lang.InstantiationException - If 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 void newDBMO(java.lang.String impl,
ObjectName name,
ModificationList list,
ObjectName aLoader)
throws java.lang.IllegalAccessException,
java.lang.ClassNotFoundException,
InstanceAlreadyExistException,
java.lang.InstantiationException,
java.lang.reflect.InvocationTargetException
- Creates a persistent instance of a managed object in the remote 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.
- Specified by:
- newDBMO in interface AdaptorMO
- Parameters:
impl
- The name of the Java implementation to be used on the server.name
- The name of the managed object to be created.list
- The list of initial values for the properties in the new managed object.aLoader
- The classloader to use.- Throws:
- CommunicationException - If there is a communication problem with the remote Managed Object Server.
- java.lang.IllegalAccessException - If managed objects cannot be accessed in the remote Managed Object Server.
- java.lang.ClassNotFoundException - If the class to be instantiated could not be found by the classloader.
- ServiceNotFoundException - If the requested service is not supported.
- InstanceAlreadyExistException - If the managed object is already registered in the repository.
- java.lang.InstantiationException - If 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)
throws java.lang.IllegalAccessException,
java.lang.InstantiationException,
java.lang.ClassNotFoundException,
java.lang.reflect.InvocationTargetException
- Allows to instantiate a Java object of a particular
class in a remote Managed Object Server.
- Specified by:
- newObj in interface AdaptorMO
- Parameters:
className
- The Java classname of the object to be created.- Throws:
- CommunicationException - If there is a communication problem with the remote Managed Object Server.
- java.lang.IllegalAccessException - If managed objects cannot be accessed in the remote Managed Object Server.
- java.lang.ClassNotFoundException - If the class to be instantiated could not be found by the classloader.
- ServiceNotFoundException - If the requested service is not supported.
- java.lang.InstantiationException - If 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.lang.IllegalAccessException,
java.lang.InstantiationException,
java.lang.ClassNotFoundException,
java.lang.reflect.InvocationTargetException
- Allows to instantiate a Java object of a particular
class in a remote Managed Object Server.
- Specified by:
- newObj in interface AdaptorMO
- Parameters:
className
- The 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.
- java.lang.IllegalAccessException - If managed objects cannot be accessed in the remote Managed Object Server.
- java.lang.ClassNotFoundException - If the class to be instantiated could not be found by the classloader.
- ServiceNotFoundException - If the requested service is not supported.
- java.lang.InstantiationException - If 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 InstanceNotFoundException,
java.lang.reflect.InvocationTargetException
- Deletes an instance of a managed object in the remote Managed Object Server.
- Specified by:
- deleteMO in interface AdaptorMO
- Parameters:
name
- The name of the object to be deleted.- Throws:
- CommunicationException - If there is a communication problem with the remote Managed Object Server.
- ServiceNotFoundException - If the requested service is not supported.
- InstanceNotFoundException - If the instance of name cannot be found in the remote Managed Object Server.
- java.lang.reflect.InvocationTargetException - It is a checked exception that wraps an exception thrown by an invoked method or constructor.
getValue
public java.lang.Object getValue(ObjectName name,
java.lang.String property)
throws InstanceNotFoundException,
PropertyNotFoundException,
java.lang.reflect.InvocationTargetException
- Allows to obtain the value of a specific property within
an object.
- Specified by:
- getValue in interface AdaptorMO
- Parameters:
name
- The name of the object(s) to retrieve.property
- The 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.
- CommunicationException - If there is a communication problem with the remote Managed Object Server.
- PropertyNotFoundException - If the property is not found on this object.
- java.lang.reflect.InvocationTargetException - It is a checked exception that wraps an exception thrown by an invoked method or constructor.
getIndexedValue
public java.lang.Object getIndexedValue(ObjectName name,
java.lang.String property,
int pos)
throws InstanceNotFoundException,
PropertyNotFoundException,
java.lang.reflect.InvocationTargetException
- Allows to obtain the value of a specific indexed property
within an object.
- Specified by:
- getIndexedValue in interface AdaptorMO
- Parameters:
name
- The name of the object(s) to retrieve.property
- The name of the property to retrieve.pos
- The 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.
- CommunicationException - If there is a communication problem with the remote Managed Object Server.
- ServiceNotFoundException - If the requested service is not supported.
- PropertyNotFoundException - If the property is not found in this object.
- java.lang.reflect.InvocationTargetException - It is a checked exception that wraps an exception thrown by an invoked method or constructor.
getValues
public PropertyList getValues(ObjectName name,
java.util.Vector propertyIdList)
throws InstanceNotFoundException
- Allows to obtain the value of a set of properties within an object.
- Specified by:
- getValues in interface AdaptorMO
- Parameters:
name
- The name of the object(s) to retrieve.propertyIdList
- The 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.
- CommunicationException - If there is a communication problem with the remote Managed Object Server.
- ServiceNotFoundException - If the requested service is not supported.
- NullPointerException - If the parameters are not valid.
setValue
public java.lang.Object setValue(ObjectName name,
java.lang.String prop,
java.lang.Object value,
java.lang.String op)
throws InstanceNotFoundException,
java.lang.IllegalAccessException,
PropertyNotFoundException,
InvalidPropertyValueException,
java.lang.ClassNotFoundException,
java.lang.InstantiationException,
java.lang.reflect.InvocationTargetException
- Allows to set the value of a specific property within an object.
The value must support the Serializable interface.
- Specified by:
- setValue in interface AdaptorMO
- Parameters:
name
- The name of the object.prop
- The name of the property to set.value
- The new value for the property.op
- The name of the operator.- Returns:
- The value of the retrieved property.
- Throws:
- InstanceNotFoundException - If the instance of name could not be found in the remote Managed Object Server.
- CommunicationException - If there is a communication problem with the remote Managed Object Server.
- java.lang.IllegalAccessException - If managed objects cannot be accessed in the remote Managed Object Server.
- ServiceNotFoundException - If the requested service is not supported.
- PropertyNotFoundException - If the property is not found in this object.
- InvalidPropertyValueException - If the value specified for the property is invalid.
- java.lang.ClassNotFoundException - If the class to be instantiated could not be found by the classloader.
- java.lang.InstantiationException - If 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.
setIndexedValue
public java.lang.Object setIndexedValue(ObjectName name,
java.lang.String prop,
java.lang.Object value,
java.lang.String op,
int pos)
throws InstanceNotFoundException,
java.lang.IllegalAccessException,
PropertyNotFoundException,
InvalidPropertyValueException,
java.lang.ClassNotFoundException,
java.lang.InstantiationException,
java.lang.reflect.InvocationTargetException
- Allows to set the value of a specific indexed property within an object.
The value must support the Serializable interface.
- Specified by:
- setIndexedValue in interface AdaptorMO
- Parameters:
name
- The name of the object.prop
- The name of the property to set.value
- The new value for the property.op
- The name of the operator.pos
- The 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.
- CommunicationException - If there is a communication problem with the remote Managed Object Server.
- java.lang.IllegalAccessException - If managed objects cannot be accessed in the remote Managed Object Server.
- ServiceNotFoundException - If the requested service is not supported.
- PropertyNotFoundException - If the property is not found in this object.
- InvalidPropertyValueException - If the value specified for the property is invalid.
- java.lang.ClassNotFoundException - If the class to be instantiated could not be found by the classloader.
- java.lang.InstantiationException - If a new instance of the specified class could not be created.
- java.lang.reflect.InvocationTargetException - It is a checked exception that wraps an exception thrown by an invoked method or constructor.
setValues
public PropertyList setValues(ObjectName name,
ModificationList modif)
throws InstanceNotFoundException,
java.lang.IllegalAccessException,
java.lang.reflect.InvocationTargetException
- Allows to set the value of several properties within an object.
The value must support the Serializable interface.
- Specified by:
- setValues in interface AdaptorMO
- Parameters:
name
- The name of the object.modif
- 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.
- CommunicationException - If there is a communication problem with the remote Managed Object Server.
- java.lang.IllegalAccessException - Ifmanaged objects cannot be accessed in the remote Managed Object Server.
- java.lang.reflect.InvocationTargetException - It is a checked exception that wraps an exception thrown by an invoked method or constructor.
transferObject
public void transferObject(java.lang.Object object,
ObjectName name)
throws InstanceAlreadyExistException,
java.lang.reflect.InvocationTargetException
- Adds a named object under the control of the remote framework.
Use this method with care because it moves an instance remotely.
All methods of this instance are executed on the remote agent.
- Specified by:
- transferObject in interface AdaptorMO
- Parameters:
object
- The object to be added to the remote repository.name
- The logical name of the object.- Throws:
- CommunicationException - If there is a communication problem with the remote Managed Object Server.
- ServiceNotFoundException - If the requested service is not supported.
- InstanceAlreadyExistException - If the managed object is already registered in the repository.
- java.lang.reflect.InvocationTargetException - It is a checked exception that wraps an exception thrown by an invoked method or constructor.
invokePerform
public java.lang.Object invokePerform(ObjectName objName,
java.lang.String pfName,
java.lang.Object[] params,
java.lang.String[] sig)
throws InstanceNotFoundException,
java.lang.NoSuchMethodException,
java.lang.reflect.InvocationTargetException,
java.lang.IllegalAccessException
- Allows any method to be applied to a remote object.
- Specified by:
- invokePerform in interface AdaptorMO
- Parameters:
objName
- The name of the remote object.pfName
- The name of the method to be applied.params
- An array containing the parameters to be passed to the method.sig
- 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.
- java.lang.IllegalAccessException - If managed objects cannot be accessed in the remote Managed Object Server.
- InstanceNotFoundException - If the instance of name could not be found in the remote Managed Object Server.
- java.lang.NoSuchMethodException - The specified method could not be found.
- java.lang.reflect.InvocationTargetException - It is a checked exception that wraps an exception thrown by an invoked method or constructor.
getObject
public java.util.Vector getObject(ObjectName name,
QueryExp query)
throws InstanceNotFoundException,
LocalException,
java.lang.reflect.InvocationTargetException
- Gets 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).
- Specified by:
- getObject in interface AdaptorMO
- Parameters:
name
- The name of the object(s) to retrieve.query
- The 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.
- CommunicationException - If there is a communication problem with the remote Managed Object Server.
- ServiceNotFoundException - If the requested service is not supported.
- LocalException - If an exception occurs locally.
- java.lang.reflect.InvocationTargetException - It is a checked exception that wraps an exception thrown by an invoked method or constructor.
cb_newMO
public java.lang.Object cb_newMO(java.lang.String impl,
ObjectName name,
ModificationList list)
throws java.lang.IllegalAccessException,
java.lang.ClassNotFoundException,
InstanceAlreadyExistException,
java.lang.InstantiationException,
LocalException,
java.lang.reflect.InvocationTargetException
- Creates an instance of a managed object in the remote 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.
- Specified by:
- cb_newMO in interface AdaptorMO
- Parameters:
impl
- The name of the Java implementation to be used on the server.name
- The name of the managed object to be created.list
- The list of initial values 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.
- java.lang.IllegalAccessException - If managed objects cannot be accessed in the remote Managed Object Server.
- java.lang.ClassNotFoundException - If the class to be instantiated could not be found by the classloader.
- ServiceNotFoundException - If the requested service is not supported.
- InstanceAlreadyExistException - If the managed object is already registered in the repository.
- java.lang.InstantiationException - If a new instance of the specified class could not be created.
- LocalException - If an exception occurs locally.
- java.lang.reflect.InvocationTargetException - It is a checked exception that wraps an exception thrown by an invoked method or constructor.
cb_newDBMO
public java.lang.Object cb_newDBMO(java.lang.String impl,
ObjectName name,
ModificationList list)
throws java.lang.IllegalAccessException,
java.lang.ClassNotFoundException,
InstanceAlreadyExistException,
java.lang.InstantiationException,
LocalException,
java.lang.reflect.InvocationTargetException
- Creates a persistent instance of a managed object in the remote 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.
- Specified by:
- cb_newDBMO in interface AdaptorMO
- Parameters:
impl
- The name of the Java implementation to be used on the server.name
- The name of the managed object to be created.list
- The list of initial values 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.
- java.lang.IllegalAccessException - If managed objects cannot be accessed in the remote Managed Object Server.
- java.lang.ClassNotFoundException - If the class to be instantiated could not be found by the classloader.
- ServiceNotFoundException - If the requested service is not supported.
- InstanceAlreadyExistException - If the managed object is already registered in the repository.
- java.lang.InstantiationException - If a new instance of the specified class could not be created.
- LocalException - If an exception occurs locally.
- java.lang.reflect.InvocationTargetException - It is a checked exception that wraps an exception thrown by an invoked method or constructor.
cb_newMO
public java.lang.Object cb_newMO(java.lang.String impl,
ObjectName name,
ModificationList list,
ObjectName aLoader)
throws java.lang.IllegalAccessException,
java.lang.ClassNotFoundException,
InstanceAlreadyExistException,
java.lang.InstantiationException,
LocalException,
java.lang.reflect.InvocationTargetException
- Creates an instance of a managed object in the remote 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.
- Specified by:
- cb_newMO in interface AdaptorMO
- Parameters:
impl
- The name of the Java implementation to be used on the server.name
- The name of the managed object to be created.list
- The list of initial values of the properties of the new managed object.aLoader
- The classloader to use.- Returns:
- The newly created managed object.
- Throws:
- CommunicationException - If there is a communication problem with the remote Managed Object Server.
- java.lang.IllegalAccessException - If managed objects cannot be accessed in the remote Managed Object Server.
- java.lang.ClassNotFoundException - If the class to be instantiated could not be found by the classloader.
- ServiceNotFoundException - If the requested service is not supported.
- InstanceAlreadyExistException - If the managed object is already registered in the repository.
- java.lang.InstantiationException - If a new instance of the specified class could not be created.
- LocalException - If an exception occurs locally.
- java.lang.reflect.InvocationTargetException - It is a checked exception that wraps an exception thrown by an invoked method or constructor.
cb_newDBMO
public java.lang.Object cb_newDBMO(java.lang.String impl,
ObjectName name,
ModificationList list,
ObjectName aLoader)
throws java.lang.IllegalAccessException,
java.lang.ClassNotFoundException,
InstanceAlreadyExistException,
java.lang.InstantiationException,
LocalException,
java.lang.reflect.InvocationTargetException
- Creates a persistent instance of a managed object in the remote 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.
- Specified by:
- cb_newDBMO in interface AdaptorMO
- Parameters:
impl
- The name of the Java implementation to be used on the server.name
- The name of the managed object to be created.list
- The list of initial values of the properties of the new managed object.aLoader
- The classloader to use.- Returns:
- The newly created managed object.
- Throws:
- CommunicationException - If there is a communication problem with the remote Managed Object Server.
- java.lang.IllegalAccessException - If managed objects cannot be accessed in the remote Managed Object Server.
- java.lang.ClassNotFoundException - If the class to be instantiated could not be found by the classloader.
- ServiceNotFoundException - If the requested service is not supported.
- InstanceAlreadyExistException - If the managed object is already registered in the repository.
- java.lang.InstantiationException - If a new instance of the specified class could not be created.
- LocalException - If an exception occurs locally.
- java.lang.reflect.InvocationTargetException - It is a checked exception that wraps an exception thrown by an invoked method or constructor.
getObjectFromCache
public ManagedObject getObjectFromCache(ObjectName name)
- Gets 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.
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.
- Specified by:
- cb_connect in interface AdaptorMO
- Parameters:
cbean
- The c-bean to connect.- Throws:
- CommunicationException - If there is a communication problem with the remote Managed Object Server.
- ServiceNotFoundException - If the requested service is not supported.
cb_disconnect
public void cb_disconnect(ManagedObject cbean)
- Disconnects the c-bean from the adaptor.
- Specified by:
- cb_disconnect in interface AdaptorMO
- Parameters:
cbean
- The c-bean to disconnect.- Throws:
- CommunicationException - If there is a communication problem with the remote Managed Object Server.
- ServiceNotFoundException - If the requested service is not supported.
getClassVersion
public static java.lang.String getClassVersion()
- Gets the version of this class.
- Returns:
- The version of this class.
getTimeoutMilliSeconds
public int getTimeoutMilliSeconds()
- Gets 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)
- Enables/disables
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:
timeoutmsecs
- The new value of the property.