|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface EngineManagement
The EngineManagement interface is the primary low-level interface to the Engine, and allows operations to be carried out on it.
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.
Method Summary | |
---|---|
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 persistent)
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 persistent,
boolean disconnectSlow)
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,
boolean persistent)
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 persistent,
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. |
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)
Connect an event receiver to the Engine. |
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,
boolean persistent)
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,
boolean persistent)
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. |
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)
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). |
Method Detail |
---|
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.EventSupplier connectEventConsumer(EventConsumer consumer, java.lang.String[] channels, boolean disconnectSlow) throws EngineException
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
to the same correlator (even if via different EngineManagement objects) 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 attachAsEventConsumerTo(EngineManagement eventSupplier, java.lang.String[] channels, boolean persistent) throws EngineException
eventSupplier
- The EngineManagement which will supply events to
this engine.channels
- An array of names representing the channels to subscribe to.persistent
- Whether this engine should reconnect on disconnection
EngineException
- Thrown if any exceptions occur in the Client SDK.void attachAsEventConsumerTo(EngineManagement eventSupplier, java.lang.String[] channels, boolean persistent, 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.persistent
- Whether this engine should reconnect on disconnectiondisconnectSlow
- Whether we should be disconnected if we don't keep up.
Only the first connection's disconnectSlow value is used; subsequent connections
to the same correlator (even if via different EngineManagement objects) share
the connection and thus the disconnect behaviour.
EngineException
- Thrown if any exceptions occur in the Client SDK.void detachAsEventConsumerFrom(EngineManagement eventSupplier, java.lang.String[] channels, boolean persistent) 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.persistent
- Whether this engine should reconnect on disconnection
EngineException
- Thrown if any exceptions occur in the Client SDK.void attachAsEventConsumerTo(java.lang.String host, int port, java.lang.String[] channels, boolean persistent) 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.persistent
- Whether this engine should reconnect on disconnection
EngineException
- Thrown if any exceptions occur in the Client SDK.void attachAsEventConsumerTo(java.lang.String host, int port, java.lang.String[] channels, boolean persistent, 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.persistent
- Whether this engine should reconnect on disconnectiondisconnectSlow
- Whether we should be disconnected if we don't keep up.
Only the first connection's disconnectSlow value is used; subsequent connections
to the same correlator (even if via different EngineManagement objects) share
the connection and thus the disconnect behaviour.
EngineException
- Thrown if any exceptions occur in the Client SDK.void detachAsEventConsumerFrom(java.lang.String host, int port, java.lang.String[] channels, boolean persistent) 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.persistent
- Whether this engine should reconnect on disconnection
EngineException
- Thrown if any exceptions occur in the Client SDK.void setPersistentReceiveConnections(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.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 interrupted
EngineException
- 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()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |