|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.sun.jaw.impl.adaptor.comm.AdaptorClient
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:
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 |
| Constructor Detail |
public AdaptorClient()
| Method Detail |
public java.lang.String getAdaptorVersion()
getClientVersion()public java.lang.String getClientVersion()
public java.lang.String getServerVersion()
public int setup(java.lang.Object param)
Example:
aclient.setup("sky");
is identical to
aclient.setup("sky:8081");
param - A String object containing the
host name and port number of the proxy (for instance sky:8081).
public void connect(java.lang.Object context,
java.lang.String host,
int port,
java.lang.String logicalName)
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.public void disconnect()
public java.lang.Boolean isConnected()
public java.lang.String getDomain()
public java.lang.ClassLoader getClassLoader()
classloader used to retrieve all MO and MOStub classes.public void setClassLoader(java.lang.ClassLoader loader)
classloader to retrieve MO and MOStub classes.loader - The classloader to be used.public MapperSrvIf getMapperSrv()
public void setMapperSrv(MapperSrvIf mapper)
mapper - The mapper service to be used.
public java.util.Vector getOnlyNames(ObjectName name,
QueryExp query)
throws InstanceNotFoundException
name - The name of the object(s) to retrieve.query - The query to apply when selecting objects.
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
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.
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
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.
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
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.
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
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.
public void newObj(java.lang.String className)
throws java.lang.IllegalAccessException,
java.lang.InstantiationException,
java.lang.ClassNotFoundException,
java.lang.reflect.InvocationTargetException
className - The Java classname of the object to be created.
public void newObj(java.lang.String className,
ObjectName aLoader)
throws java.lang.IllegalAccessException,
java.lang.InstantiationException,
java.lang.ClassNotFoundException,
java.lang.reflect.InvocationTargetException
className - The Java classname of the object to create.aLoader - The name of a classloader to use.
public void deleteMO(ObjectName name)
throws InstanceNotFoundException,
java.lang.reflect.InvocationTargetException
name - The name of the object to be deleted.
public java.lang.Object getValue(ObjectName name,
java.lang.String property)
throws InstanceNotFoundException,
PropertyNotFoundException,
java.lang.reflect.InvocationTargetException
name - The name of the object(s) to retrieve.property - The name of the property to retrieve.
public java.lang.Object getIndexedValue(ObjectName name,
java.lang.String property,
int pos)
throws InstanceNotFoundException,
PropertyNotFoundException,
java.lang.reflect.InvocationTargetException
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.
public PropertyList getValues(ObjectName name,
java.util.Vector propertyIdList)
throws InstanceNotFoundException
name - The name of the object(s) to retrieve.propertyIdList - The list of properties to retrieve.
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
The value must support the Serializable interface.
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.
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
The value must support the Serializable interface.
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.
public PropertyList setValues(ObjectName name,
ModificationList modif)
throws InstanceNotFoundException,
java.lang.IllegalAccessException,
java.lang.reflect.InvocationTargetException
The value must support the Serializable interface.
name - The name of the object.modif - The list of modifications.
public void transferObject(java.lang.Object object,
ObjectName name)
throws InstanceAlreadyExistException,
java.lang.reflect.InvocationTargetException
Use this method with care because it moves an instance remotely. All methods of this instance are executed on the remote agent.
object - The object to be added to the remote repository.name - The logical name of the object.
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
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.
public java.util.Vector getObject(ObjectName name,
QueryExp query)
throws InstanceNotFoundException,
LocalException,
java.lang.reflect.InvocationTargetException
name - The name of the object(s) to retrieve.query - The query to apply when selecting objects.
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
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.
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
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.
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
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.
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
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.public ManagedObject getObjectFromCache(ObjectName name)
name - The name of the local managed object to be accessed.public void cb_connect(ManagedObject cbean)
cbean - The c-bean to connect.public void cb_disconnect(ManagedObject cbean)
cbean - The c-bean to disconnect.public static java.lang.String getClassVersion()
public int getTimeoutMilliSeconds()
public void setTimeoutMilliSeconds(int timeoutmsecs)
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.timeoutmsecs - The new value of the property.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||