public interface EngineManagement extends EventConsumer, java.lang.AutoCloseable
The static methods of the EngineManagementFactory
class are used to
create an object implementing this interface.
Note that for most applications it is recommended to use the higher-level
interfaces provided by EngineClientBean
or IEventService
instead of the low-level EngineManagement interface.
Because an EngineManagement object is also an EventConsumer, it can have events sent to it (and to the Engine) through its sendEvents() method.
Modifier and Type | Method and Description |
---|---|
void |
attachAsEventConsumerTo(EngineManagement eventSupplier,
java.lang.String[] channels)
Connect another Engine to this one as an event supplier, with this
engine consuming its events.
|
void |
attachAsEventConsumerTo(EngineManagement eventSupplier,
java.lang.String[] channels,
boolean disconnectSlow)
Connect another Engine to this one as an event supplier, with this
engine consuming its events.
|
void |
attachAsEventConsumerTo(EngineManagement eventSupplier,
java.lang.String[] channels,
boolean disconnectSlow,
ConnectMode mode)
Connect another Engine to this one as an event supplier, with this
engine consuming its events.
|
void |
attachAsEventConsumerTo(java.lang.String host,
int port,
java.lang.String[] channels)
Connect another Engine to this one as an event supplier, with this
engine consuming its events, and the receiver should reconnect if it is disconnected.
|
void |
attachAsEventConsumerTo(java.lang.String host,
int port,
java.lang.String[] channels,
boolean disconnectSlow)
Connect another Engine to this one as an event supplier, with this
engine consuming its events, and the receiver should reconnect if it is disconnected.
|
void |
attachAsEventConsumerTo(java.lang.String host,
int port,
java.lang.String[] channels,
boolean disconnectSlow,
ConnectMode mode)
Connect another Engine to this one as an event supplier, with this
engine consuming its events, and the receiver should reconnect if it is disconnected.
|
void |
close()
Closes this resource, relinquishing any underlying resources.
|
EventSupplier |
connectEventConsumer(EventConsumer consumer,
java.lang.String[] channels)
Connect an event receiver to the Engine.
|
EventSupplier |
connectEventConsumer(EventConsumer consumer,
java.lang.String[] channels,
boolean disconnectSlow)
Deprecated.
|
void |
deleteAll()
Deletes everything from the engine.
|
void |
deleteName(java.lang.String name)
Delete a named object from the Engine.
|
void |
detachAsEventConsumerFrom(EngineManagement eventSupplier,
java.lang.String[] channels)
Detach another Engine from this one as an event supplier, with this
engine no longer consuming its events.
|
void |
detachAsEventConsumerFrom(EngineManagement eventSupplier,
java.lang.String[] channels,
ConnectMode mode)
Detach another Engine from this one as an event supplier, with this
engine no longer consuming its events.
|
void |
detachAsEventConsumerFrom(java.lang.String host,
int port,
java.lang.String[] channels)
Detach another Engine from this one as an event supplier, with this
engine no longer consuming its events.
|
void |
detachAsEventConsumerFrom(java.lang.String host,
int port,
java.lang.String[] channels,
ConnectMode mode)
Detach another Engine from this one as an event supplier, with this
engine no longer consuming its events.
|
void |
disconnect()
Disconnect this client completely from the remote component.
|
void |
flushEvents()
Wait for any outstanding events from previous
sendEvents(Event[]) calls into the
Engine, and then return. |
void |
forceDeleteName(java.lang.String name)
Force deletion of a named object from the Engine.
|
java.lang.String |
getEngineVersion()
Get the version of the Engine.
|
EngineConnection[] |
getReceiverConnections()
Get all the persistent connections associated with the engine.
|
long |
getRemotePhysicalComponentID()
Obtain a unique ID for the component that this object is connected to.
|
EngineStatus |
getStatus()
Get the Engine's current operational status.
|
java.lang.String[] |
injectCDP(byte[] cdpbytes,
java.lang.String filename)
Injects a CDP (Correlator Deployment Package) into the engine.
|
java.lang.String[] |
injectJava(byte[] jarbytes)
Injects a Java application (a jar) into the engine.
|
java.lang.String[] |
injectMonitorScript(MonitorScript script)
Inject MonitorScript text into the Engine.
|
java.lang.String[] |
injectMonitorScript(MonitorScript script,
java.lang.String filename)
Inject MonitorScript text into the Engine.
|
EngineInfo |
inspectEngine()
Ask the Engine for information about the internal state.
|
boolean |
isConnected()
This method is used to check that the Engine is
still connected.
|
void |
killName(java.lang.String name)
Kill a named object in the Engine.
|
void |
ping()
This method is used to check that the Engine is
still alive.
|
void |
sendEvents(Event[] events)
Send events into the Engine (inherited from EventConsumer),
automatically rebatching the actual event sending for efficiency.
|
void |
sendEventsNoBatching(Event[] events)
Send events into the Engine,
without rebatching the actual event sending.
|
void |
setPersistentReceiveConnections(EngineConnection... connections)
Deprecated.
use
setReceiverConnections(EngineConnection... ) instead |
void |
setReceiverConnections(EngineConnection... connections)
Attaches this component as a persistent receiver of the remote
components specified in the connections argument, then decrements the
reference count of any existing connections (which typically results in
their removal).
|
void close()
The implementation of this method should perform the same task as disconnect()
,
thus making it unnecessary to call both close()
and disconnect()
.
close
in interface java.lang.AutoCloseable
AutoCloseable.close()
void disconnect() throws EngineException
EngineException
java.lang.String[] injectMonitorScript(MonitorScript script) throws EngineException
script
- MonitorScript text to be injected.EngineException
- Thrown if any exceptions occur in the Client SDK.
This exception may contain warnings.InterruptedEngineException
- If the calling thread is interruptedjava.lang.String[] injectMonitorScript(MonitorScript script, java.lang.String filename) throws EngineException
script
- MonitorScript text to be injected.filename
- Filename that the monitorscript came from (or null)EngineException
- Thrown if any exceptions occur in the Client SDK.
This exception may contain warnings.InterruptedEngineException
- If the calling thread is interruptedvoid deleteName(java.lang.String name) throws EngineException
name
- The name of the object to be deleted.EngineException
- Thrown if any exceptions occur in the Client SDK.InterruptedEngineException
- If the calling thread is interruptedvoid forceDeleteName(java.lang.String name) throws EngineException
name
- The name of the object to be deleted.EngineException
- Thrown if any exceptions occur in the Client SDK.void killName(java.lang.String name) throws EngineException
name
- The name of the object to be killed.EngineException
- Thrown if any exceptions occur in the Client SDK.void deleteAll() throws EngineException
EngineException
java.lang.String[] injectJava(byte[] jarbytes) throws EngineException
jarbytes
- the bytes of the Java (Jmon) Application jar to be injected.EngineException
- Thrown if any exceptions occur in the Client SDK.
This exception may contain warnings.InterruptedEngineException
- If the calling thread is interruptedjava.lang.String[] injectCDP(byte[] cdpbytes, java.lang.String filename) throws EngineException
cdpbytes
- the bytes of the CDP file to be injected.filename
- the name of the file we are injecting from.EngineException
- Thrown if any exceptions occur in the Client SDK.
This exception may contain warnings.InterruptedEngineException
- If the calling thread is interruptedEngineStatus getStatus() throws EngineException
EngineException
- Thrown if any exceptions occur in the Client SDK.EngineInfo inspectEngine() throws EngineException
EngineException
- Thrown if any exceptions occur in the Client SDK.void ping() throws EngineException
EngineException
InterruptedEngineException
- If the calling thread is interruptedboolean isConnected() throws InterruptedEngineException
InterruptedEngineException
- If the calling thread is interruptedEventSupplier connectEventConsumer(EventConsumer consumer, java.lang.String[] channels) throws EngineException
consumer
- The EventConsumer to connect to the Engine.channels
- An array of names representing the channels to subscribe to.EngineException
- Thrown if any exceptions occur in the Client SDK.@Deprecated EventSupplier connectEventConsumer(EventConsumer consumer, java.lang.String[] channels, boolean disconnectSlow) throws EngineException
connectEventConsumer(EventConsumer, String[])
in combination
with EngineManagementFactory.connectToEngine(String, int, String, boolean)
}consumer
- The EventConsumer to connect to the Engine.channels
- An array of names representing the channels to subscribe to.disconnectSlow
- Whether we should be disconnected if we don't keep up.
Only the first consumer's disconnectSlow value is used; subsequent consumers
added to this EngineManagement object share the connection and thus the
disconnect behaviour.EngineException
- Thrown if any exceptions occur in the Client SDK.void attachAsEventConsumerTo(EngineManagement eventSupplier, java.lang.String[] channels) throws EngineException
eventSupplier
- The EngineManagement which will supply events to
this engine.channels
- An array of names representing the channels to subscribe to.EngineException
- Thrown if any exceptions occur in the Client SDK.void detachAsEventConsumerFrom(EngineManagement eventSupplier, java.lang.String[] channels) throws EngineException
eventSupplier
- The EngineManagement which is currently supplying events to
this engine.channels
- An array of names representing the channels we were subscribed to.EngineException
- Thrown if any exceptions occur in the Client SDK.void detachAsEventConsumerFrom(EngineManagement eventSupplier, java.lang.String[] channels, ConnectMode mode) throws EngineException
eventSupplier
- The EngineManagement which is currently supplying events to
this engine.channels
- An array of names representing the channels we were subscribed to.mode
- the connection mode to use, defaults to legacy
(single connection, all events delivered to the default
channel). Set to PARALLEL for connection per channel and
channel values passed through.EngineException
- Thrown if any exceptions occur in the Client SDK.void attachAsEventConsumerTo(EngineManagement eventSupplier, java.lang.String[] channels, boolean disconnectSlow) throws EngineException
eventSupplier
- The EngineManagement which will supply events to
this engine.channels
- An array of names representing the channels to subscribe to.disconnectSlow
- Whether we should be disconnected if we don't keep up.
Only the first consumer's disconnectSlow value is used; subsequent consumers
added to this EngineManagement object share the connection and thus the
disconnect behaviour.EngineException
- Thrown if any exceptions occur in the Client SDK.void attachAsEventConsumerTo(EngineManagement eventSupplier, java.lang.String[] channels, boolean disconnectSlow, ConnectMode mode) throws EngineException
eventSupplier
- The EngineManagement which will supply events to
this engine.channels
- An array of names representing the channels to subscribe to.disconnectSlow
- Whether we should be disconnected if we don't keep up.
Only the first consumer's disconnectSlow value is used; subsequent consumers
added to this EngineManagement object share the connection and thus the
disconnect behaviour.mode
- the connection mode to use, defaults to legacy
(single connection, all events delivered to the default
channel). Set to PARALLEL for connection per channel and
channel values passed through.EngineException
- Thrown if any exceptions occur in the Client SDK.void attachAsEventConsumerTo(java.lang.String host, int port, java.lang.String[] channels) throws EngineException
host
- host of the component which is supplying eventsport
- port of the component which is supplying eventschannels
- An array of names representing the channels to subscribe to.EngineException
- Thrown if any exceptions occur in the Client SDK.void attachAsEventConsumerTo(java.lang.String host, int port, java.lang.String[] channels, boolean disconnectSlow) throws EngineException
host
- host of the component which is supplying eventsport
- port of the component which is supplying eventschannels
- An array of names representing the channels to subscribe to.disconnectSlow
- Whether we should be disconnected if we don't keep up.
Only the first consumer's disconnectSlow value is used; subsequent consumers
added to this EngineManagement object share the connection and thus the
disconnect behaviour.EngineException
- Thrown if any exceptions occur in the Client SDK.void attachAsEventConsumerTo(java.lang.String host, int port, java.lang.String[] channels, boolean disconnectSlow, ConnectMode mode) throws EngineException
host
- host of the component which is supplying eventsport
- port of the component which is supplying eventschannels
- An array of names representing the channels to subscribe to.disconnectSlow
- Whether we should be disconnected if we don't keep up.
Only the first consumer's disconnectSlow value is used; subsequent consumers
added to this EngineManagement object share the connection and thus the
disconnect behaviour.mode
- the connection mode to use, defaults to legacy
(single connection, all events delivered to the default
channel). Set to PARALLEL for connection per channel and
channel values passed through.EngineException
- Thrown if any exceptions occur in the Client SDK.void detachAsEventConsumerFrom(java.lang.String host, int port, java.lang.String[] channels) throws EngineException
host
- host of the component which is supplying eventsport
- port of the component which is supplying eventschannels
- An array of names representing the channels we were subscribed to.EngineException
- Thrown if any exceptions occur in the Client SDK.void detachAsEventConsumerFrom(java.lang.String host, int port, java.lang.String[] channels, ConnectMode mode) throws EngineException
host
- host of the component which is supplying eventsport
- port of the component which is supplying eventschannels
- An array of names representing the channels we were subscribed to.mode
- the connection mode to use, defaults to legacy
(single connection, all events delivered to the default
channel). Set to PARALLEL for connection per channel and
channel values passed through.EngineException
- Thrown if any exceptions occur in the Client SDK.@Deprecated void setPersistentReceiveConnections(EngineConnection... connections) throws EngineException
setReceiverConnections(EngineConnection... )
insteadconnections
- Must not contain null
elements.EngineException
- If the change in the persistent connection set
failed. Note that no exception is thrown if some of the specified
connections could not be established immediately - in this case the
receiver will simply keep trying to reconnect in the background.void setReceiverConnections(EngineConnection... connections) throws EngineException
connections
- Must not contain null
elements.EngineException
- If the change in the persistent connection set
failed. Note that no exception is thrown if some of the specified
connections could not be established immediately - in this case the
receiver will simply keep trying to reconnect in the background.EngineConnection[] getReceiverConnections() throws EngineException
EngineException
- Thrown if any exceptions occur in the Client SDK.java.lang.String getEngineVersion() throws EngineException
EngineException
- Thrown if any exceptions occur in the Client SDK.void sendEvents(Event[] events) throws EngineException
sendEvents
in interface EventConsumer
events
- An array of Event objects containing the events to send into the Engine.InterruptedEngineException
- If the calling thread is interruptedEngineException
- Thrown if any exceptions occur in the Client SDK.void sendEventsNoBatching(Event[] events) throws EngineException
events
- An array of Event objects containing the events to send into the Engine.EngineException
- Thrown if any exceptions occur in the Client SDK.InterruptedEngineException
- If the calling thread is interruptedflushEvents()
void flushEvents() throws EngineException, java.lang.InterruptedException
sendEvents(Event[])
calls into the
Engine, and then return.EngineException
- Thrown if any exceptions occur in the Client SDK.java.lang.InterruptedException
- Thrown if this thread is interrupted
while waiting for outstanding events to be sent and acknowledged
(see Thread.interrupt()
.sendEvents(Event[])
long getRemotePhysicalComponentID()
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.