|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.apama.net.beans.AbstractGenericComponentManagementBean com.apama.net.beans.GenericComponentManagementBean
public class GenericComponentManagementBean
GenericComponentManagementBean is a JavaBean that provides a way of controlling an arbitrary server that exports a GenericComponentManagement interface. The bean is intended to be a building block for the creation of client applications.
The main() method provides the ability to run the bean from the command line.
Note that changes to the value of the "host" or "port" properties that are inherited from the superclass will cause the bean to attempt to re-connect to a server running on a new host/port. This re-connection will happen immediately if the bean was connected at the time of the property change, but will happen later in a "lazy" fashion if there was no existing connection at the time of the property change.
General pattern of use:
Field Summary |
---|
Fields inherited from class com.apama.net.beans.AbstractGenericComponentManagementBean |
---|
DEFAULT_PORT |
Fields inherited from interface com.apama.net.beans.interfaces.BaseClientInterface |
---|
COPYRIGHT, DEFAULT_CONNECTION_POLLING_INTERVAL, DEFAULT_HOST, DEFAULT_PORT, DEFAULT_PROCESS_NAME, PROPERTY_BEAN_CONNECTED, PROPERTY_CONNECTION_POLLING_INTERVAL, PROPERTY_HOST, PROPERTY_PORT, PROPERTY_PROCESS_NAME, PROPERTY_VERBOSE, VERSION |
Constructor Summary | |
---|---|
GenericComponentManagementBean()
Default constructor - as required to be a bean. |
|
GenericComponentManagementBean(java.lang.String socket_hostname,
int socket_port,
java.lang.String processName)
Full argument constructor. |
Method Summary | |
---|---|
boolean |
deepPing()
Ask the remote server to perform a 'deep ping' operation. |
boolean |
disconnectReceiverByPhysicalId(long id,
java.lang.String why)
Disconnect the receiver connected to this component that has physical ID id. |
boolean |
disconnectSenderByPhysicalId(long id,
java.lang.String why)
Disconnect the sender connected to this component that has physical ID id. |
java.lang.String |
doRequest(java.lang.String request)
Execute a component-specific command |
java.lang.String |
getBuildNumber()
Get the component's build number |
java.lang.String |
getBuildPlatform()
Get the component's build platform |
java.lang.String |
getComponentVersion()
Get the component's version number |
GenericComponentManagement.GenericComponentConnectionSet |
getConnections()
|
java.lang.String |
getCurrentDirectory()
Get the component's current working directory path |
java.lang.String |
getHostname()
Get the hostname that component is running on |
GenericComponentManagement.GenericComponentInfo |
getInfo(java.lang.String category)
Request component-specific status/configuration information |
long |
getLogicalId()
Get the unique logical ID of the component |
GenericComponentManagement.GenericComponentLogLevel |
getLogLevel()
Get the component's current logging level |
java.lang.String |
getName()
Get the name of the component, encoded as UTF-8 |
long |
getPhysicalId()
Get the globally unique physical ID of the component |
long |
getPID()
Return the process identifier of the remote server. |
java.lang.String |
getProductVersion()
Get the version number of the product the component belongs to |
int |
getRemotePort()
Get the port number that the component is listening on |
java.lang.String |
getType()
Get the type of the component, encoded as UTF-8 |
java.lang.String |
getUsername()
Get the effective username the component is running as |
boolean |
isGenericComponentManagementAvailable()
Return true if the remote server actually implements the GenericComponentManagement interface. |
static void |
main(java.lang.String[] args)
This bean can be invoked from the command prompt. |
void |
setLogLevel(GenericComponentManagement.GenericComponentLogLevel logLevel)
Set the component's logging level |
void |
shutdown(java.lang.String why)
Tell the remote server to shut itself down. |
Methods inherited from class com.apama.net.beans.AbstractGenericComponentManagementBean |
---|
addPropertyChangeListener, addPropertyChangeListener, connectNow, disconnect, dispose, getBeanConnected, getConnectionPollingInterval, getHost, getPort, getProcessName, getVerbose, isBeanConnected, pingServer, removePropertyChangeListener, removePropertyChangeListener, setConnectionPollingInterval, setHost, setPort, setProcessName, setVerbose |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.apama.net.beans.interfaces.PingOperationsInterface |
---|
pingServer |
Methods inherited from interface com.apama.net.beans.interfaces.BaseClientInterface |
---|
addPropertyChangeListener, addPropertyChangeListener, connectNow, disconnect, dispose, getBeanConnected, getConnectionPollingInterval, getHost, getPort, getProcessName, isBeanConnected, removePropertyChangeListener, removePropertyChangeListener, setConnectionPollingInterval, setHost, setPort, setProcessName |
Constructor Detail |
---|
public GenericComponentManagementBean()
public GenericComponentManagementBean(java.lang.String socket_hostname, int socket_port, java.lang.String processName) throws GenericComponentManagementException
socket_hostname
- Name of the host where the server is running.socket_port
- Port number on which the server is listening.processName
- the process name to use
GenericComponentManagementException
- Thrown if any exceptions
occur in the Client SDK.Method Detail |
---|
public boolean isGenericComponentManagementAvailable()
isGenericComponentManagementAvailable
in interface GenericComponentManagementOperationsInterface
public boolean deepPing() throws GenericComponentManagementException
deepPing
in interface GenericComponentManagementOperationsInterface
GenericComponentManagementException
- Thrown if any exceptions
occur in the Client SDK.public long getPID() throws GenericComponentManagementException
getPID
in interface GenericComponentManagementOperationsInterface
GenericComponentManagementException
- Thrown if any exceptions
occur in the Client SDK.public void shutdown(java.lang.String why) throws GenericComponentManagementException
shutdown
in interface GenericComponentManagementOperationsInterface
why
- Message that the server can write to its logs, indicating why
it was shut down.
GenericComponentManagementException
- Thrown if any exceptions
occur in the Client SDK.public boolean disconnectReceiverByPhysicalId(long id, java.lang.String why) throws GenericComponentManagementException
id
- the IDwhy
- free form text that is sent to the remote receiver
GenericComponentManagementException
getConnections()
public boolean disconnectSenderByPhysicalId(long id, java.lang.String why) throws GenericComponentManagementException
id
- the IDwhy
- free form text that is sent to the remote sender
GenericComponentManagementException
getConnections()
public java.lang.String getName() throws GenericComponentManagementException
GenericComponentManagementOperationsInterface
getName
in interface GenericComponentManagementOperationsInterface
GenericComponentManagementException
public java.lang.String getType() throws GenericComponentManagementException
GenericComponentManagementOperationsInterface
getType
in interface GenericComponentManagementOperationsInterface
GenericComponentManagementException
public long getPhysicalId() throws GenericComponentManagementException
GenericComponentManagementOperationsInterface
getPhysicalId
in interface GenericComponentManagementOperationsInterface
GenericComponentManagementException
public long getLogicalId() throws GenericComponentManagementException
GenericComponentManagementOperationsInterface
getLogicalId
in interface GenericComponentManagementOperationsInterface
GenericComponentManagementException
public GenericComponentManagement.GenericComponentLogLevel getLogLevel() throws GenericComponentManagementException
GenericComponentManagementOperationsInterface
getLogLevel
in interface GenericComponentManagementOperationsInterface
GenericComponentManagementException
public void setLogLevel(GenericComponentManagement.GenericComponentLogLevel logLevel) throws GenericComponentManagementException
GenericComponentManagementOperationsInterface
setLogLevel
in interface GenericComponentManagementOperationsInterface
GenericComponentManagementException
public java.lang.String getComponentVersion() throws GenericComponentManagementException
GenericComponentManagementOperationsInterface
getComponentVersion
in interface GenericComponentManagementOperationsInterface
GenericComponentManagementException
public java.lang.String getProductVersion() throws GenericComponentManagementException
GenericComponentManagementOperationsInterface
getProductVersion
in interface GenericComponentManagementOperationsInterface
GenericComponentManagementException
public java.lang.String getBuildNumber() throws GenericComponentManagementException
GenericComponentManagementOperationsInterface
getBuildNumber
in interface GenericComponentManagementOperationsInterface
GenericComponentManagementException
public java.lang.String getBuildPlatform() throws GenericComponentManagementException
GenericComponentManagementOperationsInterface
getBuildPlatform
in interface GenericComponentManagementOperationsInterface
GenericComponentManagementException
public java.lang.String getHostname() throws GenericComponentManagementException
GenericComponentManagementOperationsInterface
getHostname
in interface GenericComponentManagementOperationsInterface
GenericComponentManagementException
public java.lang.String getUsername() throws GenericComponentManagementException
GenericComponentManagementOperationsInterface
getUsername
in interface GenericComponentManagementOperationsInterface
GenericComponentManagementException
public java.lang.String getCurrentDirectory() throws GenericComponentManagementException
GenericComponentManagementOperationsInterface
getCurrentDirectory
in interface GenericComponentManagementOperationsInterface
GenericComponentManagementException
public int getRemotePort() throws GenericComponentManagementException
GenericComponentManagementOperationsInterface
getRemotePort
in interface GenericComponentManagementOperationsInterface
GenericComponentManagementException
public java.lang.String doRequest(java.lang.String request) throws GenericComponentManagementException
GenericComponentManagementOperationsInterface
doRequest
in interface GenericComponentManagementOperationsInterface
GenericComponentManagementException
public GenericComponentManagement.GenericComponentInfo getInfo(java.lang.String category) throws GenericComponentManagementException
GenericComponentManagementOperationsInterface
getInfo
in interface GenericComponentManagementOperationsInterface
GenericComponentManagementException
public GenericComponentManagement.GenericComponentConnectionSet getConnections() throws GenericComponentManagementException
GenericComponentManagementException
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |