com.apama.engine.beans.interfaces
Interface ConnectOperationsInterface

All Known Subinterfaces:
EngineClientInterface
All Known Implementing Classes:
EngineClientBean

public interface ConnectOperationsInterface

ConnectOperationsInterface is an interface that specifies methods for connecting an engine as a consumer of another engine.


Method Summary
 void attachAsConsumerOfEngine(EngineClientBean sourceEngineBean, java.lang.String[] channels)
          Connect this engine to another (non-persisently) so that it receives events emitted on the specified channels.
 void attachAsConsumerOfEngine(java.lang.String sourceHost, int sourcePort, java.lang.String[] channels)
          Connect this engine to another (non-persistently) so that it receives events emitted on the specified channels.
 void attachAsConsumerOfEngine(java.lang.String sourceHost, int sourcePort, java.lang.String[] channels, boolean persistent)
          Connect this engine to another so that it receives events emitted on the specified channels.
 void attachAsConsumerOfEngine(java.lang.String sourceHost, int sourcePort, java.lang.String[] channels, boolean persistent, boolean disconnectSlow)
          Connect this engine to another so that it receives events emitted on the specified channels.
 void detachAsConsumerOfEngine(EngineClientBean sourceEngineBean, java.lang.String[] channels)
          Disconnect this engine from another so that it not longer receives events emitted on the specified channels.
 void detachAsConsumerOfEngine(java.lang.String sourceHost, int sourcePort, java.lang.String[] channels)
          Disconnect this engine from another so that it not longer receives events emitted on the specified channels.
 void detachAsConsumerOfEngine(java.lang.String sourceHost, int sourcePort, java.lang.String[] channels, boolean persistent)
          Disconnect this engine from another so that it not longer receives events emitted on the specified channels.
 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

attachAsConsumerOfEngine

void attachAsConsumerOfEngine(EngineClientBean sourceEngineBean,
                              java.lang.String[] channels)
                              throws EngineException
Connect this engine to another (non-persisently) so that it receives events emitted on the specified channels. This is equivalent to the engine_connect command.

Note: If you do not already have a connected EngineClientBean instance for the source engine, it is usually more efficient to call the overloaded ConnectOperationsInterface#attachAsConsumerOfEngine(String, int, String[]) method which takes a source host and port instead.

Parameters:
sourceEngineBean - The EngineClientBean instance for the engine to receive from.
channels - the list of channels from which the engine should receive events. Must be non-null, and contain no null elements.
Throws:
EngineException - if the engines cannot be connected, or if the channels parameter is invalid.

attachAsConsumerOfEngine

void attachAsConsumerOfEngine(java.lang.String sourceHost,
                              int sourcePort,
                              java.lang.String[] channels)
                              throws EngineException
Connect this engine to another (non-persistently) so that it receives events emitted on the specified channels. This is equivalent to the engine_connect command.

Parameters:
sourceHost - The host of the engine to receive from.
sourcePort - The port of the engine to receive from.
channels - the list of channels from which the engine should receive events. Must be non-null, and contain no null elements.
Throws:
EngineException - if the engines cannot be connected, or if the channels parameter is invalid.

attachAsConsumerOfEngine

void attachAsConsumerOfEngine(java.lang.String sourceHost,
                              int sourcePort,
                              java.lang.String[] channels,
                              boolean persistent)
                              throws EngineException
Connect this engine to another so that it receives events emitted on the specified channels. This is equivalent to the engine_connect command.

Parameters:
sourceHost - The host of the engine to receive from.
sourcePort - The port of the engine to receive from.
channels - the list of channels from which the engine should receive events. Must be non-null, and contain no null elements.
persistent - if true, the connection will be persistent, meaning that the receiver will automatically reconnect to the sender whenever the connection is lost.
Throws:
EngineException - if the engines cannot be connected, or if the channels parameter is invalid.

attachAsConsumerOfEngine

void attachAsConsumerOfEngine(java.lang.String sourceHost,
                              int sourcePort,
                              java.lang.String[] channels,
                              boolean persistent,
                              boolean disconnectSlow)
                              throws EngineException
Connect this engine to another so that it receives events emitted on the specified channels. This is equivalent to the engine_connect command.

Parameters:
sourceHost - The host of the engine to receive from.
sourcePort - The port of the engine to receive from.
channels - the list of channels from which the engine should receive events. Must be non-null, and contain no null elements.
persistent - if true, the connection will be persistent, meaning that the receiver will automatically reconnect to the sender whenever the connection is lost.
disconnectSlow - 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.
Throws:
EngineException - if the engines cannot be connected, or if the channels parameter is invalid.

detachAsConsumerOfEngine

void detachAsConsumerOfEngine(EngineClientBean sourceEngineBean,
                              java.lang.String[] channels)
                              throws EngineException
Disconnect this engine from another so that it not longer receives events emitted on the specified channels. This is equivalent to the engine_connect --disconnect command, and assumes the connection is non-persistent.

Parameters:
sourceEngineBean - The EngineClientBean instance for the engine this object is currently connected to as a consumer.
channels - the list of channels from which the engine should receive events. Must be non-null, and contain no null elements.
Throws:
EngineException - if the engines cannot be disconnected, or if the channels parameter is invalid.

detachAsConsumerOfEngine

void detachAsConsumerOfEngine(java.lang.String sourceHost,
                              int sourcePort,
                              java.lang.String[] channels)
                              throws EngineException
Disconnect this engine from another so that it not longer receives events emitted on the specified channels. This is equivalent to the engine_connect --disconnect command, and assumes the connection is non-persistent.

Parameters:
sourceHost - The host of the engine this object is currently connected to as a consumer.
sourcePort - The port of the engine this object is currently connected to as a consumer.
channels - the list of channels from which the engine should receive events. Must be non-null, and contain no null elements.
Throws:
EngineException - if the engines cannot be disconnected, or if the channels parameter is invalid.

detachAsConsumerOfEngine

void detachAsConsumerOfEngine(java.lang.String sourceHost,
                              int sourcePort,
                              java.lang.String[] channels,
                              boolean persistent)
                              throws EngineException
Disconnect this engine from another so that it not longer receives events emitted on the specified channels. This is equivalent to the engine_connect --disconnect or engine_connect --disconnect --persistent command.

Parameters:
sourceHost - The host of the engine this object is currently connected to as a consumer.
sourcePort - The port of the engine this object is currently connected to as a consumer.
channels - the list of channels from which the engine should receive events. Must be non-null, and contain no null elements.
persistent - true if the connection to be removed was persistent (i.e. the receiver automatically reconnects to the sender whenever the connection is lost).
Throws:
EngineException - if the engines cannot be disconnected, or if the channels parameter is invalid.

setPersistentReceiveConnections

void setPersistentReceiveConnections(EngineConnection... connections)
                                     throws EngineException
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).

Parameters:
connections - Must not contain null elements.
Throws:
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.


Submit a bug or feature
Copyright (c) 2013 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or Terracotta Inc., San Francisco, CA, USA, and/or Software AG (Canada) Inc., Cambridge, Ontario, Canada, and/or, Software AG (UK) Ltd., Derby, United Kingdom, and/or Software A.G. (Israel) Ltd., Or-Yehuda, Israel and/or their licensors. Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG