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_PORTCOPYRIGHT, 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, setVerboseequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpingServeraddPropertyChangeListener, addPropertyChangeListener, close, connectNow, disconnect, dispose, getBeanConnected, getConnectionPollingInterval, getHost, getPort, getProcessName, isBeanConnected, removePropertyChangeListener, removePropertyChangeListener, setConnectionPollingInterval, setHost, setPort, setProcessNamepublic 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 GenericComponentManagementOperationsInterfacepublic boolean deepPing()
throws GenericComponentManagementException
deepPing in interface GenericComponentManagementOperationsInterfaceGenericComponentManagementException - Thrown if any exceptions
occur in the Client SDK.public long getPID()
throws GenericComponentManagementException
getPID in interface GenericComponentManagementOperationsInterfaceGenericComponentManagementException - Thrown if any exceptions
occur in the Client SDK.public void shutdown(java.lang.String why)
throws GenericComponentManagementException
shutdown in interface GenericComponentManagementOperationsInterfacewhy - 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 receiverGenericComponentManagementExceptiongetConnections()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 senderGenericComponentManagementExceptiongetConnections()public java.lang.String getName()
throws GenericComponentManagementException
GenericComponentManagementOperationsInterfacegetName in interface GenericComponentManagementOperationsInterfaceGenericComponentManagementExceptionpublic java.lang.String getType()
throws GenericComponentManagementException
GenericComponentManagementOperationsInterfacegetType in interface GenericComponentManagementOperationsInterfaceGenericComponentManagementExceptionpublic int getUptime()
throws GenericComponentManagementException
GenericComponentManagementOperationsInterfacegetUptime in interface GenericComponentManagementOperationsInterfaceGenericComponentManagementExceptionpublic float getVMemory()
throws GenericComponentManagementException
GenericComponentManagementOperationsInterfacegetVMemory in interface GenericComponentManagementOperationsInterfaceGenericComponentManagementExceptionpublic float getPMemory()
throws GenericComponentManagementException
GenericComponentManagementOperationsInterfacegetPMemory in interface GenericComponentManagementOperationsInterfaceGenericComponentManagementExceptionpublic long getPhysicalId()
throws GenericComponentManagementException
GenericComponentManagementOperationsInterfacegetPhysicalId in interface GenericComponentManagementOperationsInterfaceGenericComponentManagementExceptionpublic long getLogicalId()
throws GenericComponentManagementException
GenericComponentManagementOperationsInterfacegetLogicalId in interface GenericComponentManagementOperationsInterfaceGenericComponentManagementExceptionpublic GenericComponentManagement.GenericComponentLogLevel getLogLevel() throws GenericComponentManagementException
GenericComponentManagementOperationsInterfacegetLogLevel in interface GenericComponentManagementOperationsInterfaceGenericComponentManagementExceptionpublic void setLogLevel(GenericComponentManagement.GenericComponentLogLevel logLevel) throws GenericComponentManagementException
GenericComponentManagementOperationsInterfacesetLogLevel in interface GenericComponentManagementOperationsInterfaceGenericComponentManagementExceptionpublic java.lang.String getComponentVersion()
throws GenericComponentManagementException
GenericComponentManagementOperationsInterfacegetComponentVersion in interface GenericComponentManagementOperationsInterfaceGenericComponentManagementExceptionpublic java.lang.String getProductVersion()
throws GenericComponentManagementException
GenericComponentManagementOperationsInterfacegetProductVersion in interface GenericComponentManagementOperationsInterfaceGenericComponentManagementExceptionpublic java.lang.String getBuildNumber()
throws GenericComponentManagementException
GenericComponentManagementOperationsInterfacegetBuildNumber in interface GenericComponentManagementOperationsInterfaceGenericComponentManagementExceptionpublic java.lang.String getBuildPlatform()
throws GenericComponentManagementException
GenericComponentManagementOperationsInterfacegetBuildPlatform in interface GenericComponentManagementOperationsInterfaceGenericComponentManagementExceptionpublic java.lang.String getHostname()
throws GenericComponentManagementException
GenericComponentManagementOperationsInterfacegetHostname in interface GenericComponentManagementOperationsInterfaceGenericComponentManagementExceptionpublic java.lang.String getUsername()
throws GenericComponentManagementException
GenericComponentManagementOperationsInterfacegetUsername in interface GenericComponentManagementOperationsInterfaceGenericComponentManagementExceptionpublic java.lang.String getCurrentDirectory()
throws GenericComponentManagementException
GenericComponentManagementOperationsInterfacegetCurrentDirectory in interface GenericComponentManagementOperationsInterfaceGenericComponentManagementExceptionpublic int getRemotePort()
throws GenericComponentManagementException
GenericComponentManagementOperationsInterfacegetRemotePort in interface GenericComponentManagementOperationsInterfaceGenericComponentManagementExceptionpublic java.lang.String doRequest(java.lang.String type,
java.lang.String[] args)
throws GenericComponentManagementException
GenericComponentManagementOperationsInterfacedoRequest in interface GenericComponentManagementOperationsInterfaceGenericComponentManagementExceptionpublic GenericComponentManagement.GenericComponentInfo getInfo(java.lang.String category) throws GenericComponentManagementException
GenericComponentManagementOperationsInterfacegetInfo in interface GenericComponentManagementOperationsInterfaceGenericComponentManagementExceptionpublic GenericComponentManagement.GenericComponentConnectionSet getConnections() throws GenericComponentManagementException
public static void main(java.lang.String[] args)
Submit a bug or feature
Copyright (c) 2013-2017 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.