public class GenericComponentManagementBean extends AbstractGenericComponentManagementBean implements GenericComponentManagementOperationsInterface
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:
DEFAULT_PORT
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 and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
boolean |
deepPing()
Ask the remote server to perform a 'deep ping' operation.
|
boolean |
disconnectReceiverByComponentId(com.apama.message.ComponentIDTuple id,
java.lang.String why)
Disconnect the receiver connected to this component that has component ID
id.
|
boolean |
disconnectSenderByComponentId(com.apama.message.ComponentIDTuple id,
java.lang.String why)
Disconnect the sender connected to this component that has component ID
id.
|
java.lang.String |
doRequest(java.lang.String type,
java.lang.String[] args)
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.
|
float |
getPMemory()
Get the physical memory usage of the component, in megabytes
|
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
|
int |
getUptime()
Get the uptime of the component, in ms
|
java.lang.String |
getUsername()
Get the effective username the component is running as
|
float |
getVMemory()
Get the virtual memory usage of the component, in megabytes
|
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.
|
addPropertyChangeListener, addPropertyChangeListener, close, connectNow, disconnect, dispose, getBeanConnected, getConnectionPollingInterval, getHost, getPort, getProcessName, getVerbose, isBeanConnected, pingServer, removePropertyChangeListener, removePropertyChangeListener, setConnectionPollingInterval, setHost, setPort, setProcessName, setVerbose
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
pingServer
addPropertyChangeListener, addPropertyChangeListener, close, connectNow, disconnect, dispose, getBeanConnected, getConnectionPollingInterval, getHost, getPort, getProcessName, isBeanConnected, removePropertyChangeListener, removePropertyChangeListener, setConnectionPollingInterval, setHost, setPort, setProcessName
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 useGenericComponentManagementException
- Thrown if any exceptions
occur in the Client SDK.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 disconnectReceiverByComponentId(com.apama.message.ComponentIDTuple id, java.lang.String why) throws GenericComponentManagementException
id
- the IDwhy
- free form text that is sent to the remote receiverGenericComponentManagementException
getConnections()
public boolean disconnectSenderByComponentId(com.apama.message.ComponentIDTuple id, java.lang.String why) throws GenericComponentManagementException
id
- the IDwhy
- free form text that is sent to the remote senderGenericComponentManagementException
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 int getUptime() throws GenericComponentManagementException
GenericComponentManagementOperationsInterface
getUptime
in interface GenericComponentManagementOperationsInterface
GenericComponentManagementException
public float getVMemory() throws GenericComponentManagementException
GenericComponentManagementOperationsInterface
getVMemory
in interface GenericComponentManagementOperationsInterface
GenericComponentManagementException
public float getPMemory() throws GenericComponentManagementException
GenericComponentManagementOperationsInterface
getPMemory
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 type, java.lang.String[] args) 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
public static void main(java.lang.String[] args)
Submit a bug or feature
Copyright (c) 2013-2018 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors. Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG.