|
Tivoli Confidential | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tivoli.tec.event_delivery.TECAgent
A TECAgent object is the top level object created by the Enhanced EIF user to enable sending events to a TEC event consumer - Sender delivery mode - or receiving events from a TEC event source - Receiver delivery mode.
Field Summary | |
---|---|
static int |
COMM_CFG
Specifies that configuration should be used. |
static int |
COMM_LCF
Specifies that TME Endpoint (LCF) communications should be used. |
static int |
COMM_NONTME
Specifies that non-TME communications should be used. |
static int |
COMM_NONTME_SOCKET
Specifies that non-TME communications should be used. |
static int |
COMM_TME
Specifies that TME Managed Node communications should be used. |
static int |
RECEIVER_MODE
Specifies that Receiver delivery mode should be used. |
static int |
SEND_FAILURE
Returned by sendEvent() when event wasn't successfully sent to the server or buffered on disk. |
static int |
SEND_FILTERED
Returned by sendEvent() when event successfully match the filter and is discarded. |
static int |
SENDER_MODE
Specifies that Sender delivery mode should be used. |
Constructor Summary | |
---|---|
TECAgent(Reader configStream,
int tmeMode)
Deprecated. This constructor is externalized by EIF API 3.8 just to avoid backward compatibility issues. |
|
TECAgent(Reader configStream,
int deliveryMode,
boolean oneway)
Constructor used to create the Enhanced EIF API. |
Method Summary | |
---|---|
void |
disconnect()
Closes any open connection to the servers. |
void |
disconnect(int max_seconds_to_wait)
Closes any open connection to the servers. |
String |
getConfigVal(String key)
Retrieves a value from the TECAgent's configuration. |
static void |
main(String[] argv)
Supports postzmsg/wpostzmsg style command line sends of events. |
String |
receiveEvent()
Receive events from all the servers specified in the configuration file used to initialize the TECAgent. |
void |
registerListener(IEventProcessing evProc)
This method should be used to register the application object responsible to receive events asynchrously through this API and that should be notified when a event is ready for processing. |
int |
sendEvent(String events)
Try to send events to one of the servers specified in the configuration file used to initialize the TECAgent. |
int |
sendEvent(String[] events)
Try to send events to one of the servers specified in the configuration file used to initialize the TECAgent. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int SEND_FAILURE
public static final int SEND_FILTERED
public static final int COMM_NONTME
public static final int SENDER_MODE
public static final int RECEIVER_MODE
public static final int COMM_TME
public static final int COMM_NONTME_SOCKET
public static final int COMM_LCF
public static final int COMM_CFG
Constructor Detail |
public TECAgent(Reader configStream, int tmeMode) throws EDException
SENDER_MODE
and
the EIF 3.7.1 configuration only.
configStream
- object to be used to read the configuration
keywords.tmeMode
- the communication mode to be used.
It should to be COMM_NONTME, which is the only
communication mode supported by EIF 3.7.1.public TECAgent(Reader configStream, int deliveryMode, boolean oneway) throws EDException
configStream
- object to be used to read the configuration
keywords.deliveryMode
- Specifies which delivery mode should be used.
The values SENDER_MODE and
RECEIVE_MODE are valid.oneway
- Used for TME Managed Node connections only to
designate whether calls to sendEvent()
will return exceptions to the caller in
the event of failure.
A value of 0
means that exceptions
should not be returned to the caller; a value
of 1
means that exception should
be returned to the caller.Method Detail |
public String getConfigVal(String key)
key
- Specifies the configuration keyword label
public int sendEvent(String events)
public int sendEvent(String[] events)
events
- Array of event data you want to send to the server.
If each event data in the events array
is non-null, then it must be at least
TECEvent.MIN_EVENT_LEN chars long or
sendEvent() returns w/ error.
public String receiveEvent()
public void disconnect(int max_seconds_to_wait)
max_seconds_to_wait
- < 0 - Wait forever or until cache is emptied. If the
server is down this API call will not return.
= 0 - Send events from the cache while the connection remains up.
It could take a while to send all the events if the cache is large.
The API call will return as soon as the cache is empty or
the connection to the TEC Server is lost.
> 0 - Stop emptying the cache after the specified number of seconds.
The API call will return as soon as the cache is empty or
after the specified number of seconds.public void disconnect()
public void registerListener(IEventProcessing evProc)
evProc
- object responsible to process event received
asynchronously by the API.public static void main(String[] argv)
|
Tivoli Confidential | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |