|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Adaptor
An adaptor is a component that runs within the Local Agent, producing chunks of monitoring data. An adaptor can, but need not, have an associated thread. If an adaptor lacks a thread, it needs to arrange some mechanism to periodically get control and send reports such as a callback somewhere. Adaptors must be able to stop and resume without losing data, using a byte offset in the stream. If an adaptor crashes at byte offset n, and is restarted at byte offset k, with k < n, it is allowed to send different values for bytes k through n the second time around. However, the stream must still be parseable, assuming that bytes 0-k come from the first run,and bytes k - n come from the second. Note that Adaptor implements neither equals() nor hashCode(). It is never safe to compare two adaptors with equals(). It is safe to use adaptors as hash table keys, though two distinct Adaptors will appear as two distinct keys. This is the desired behavior, since it means that messages intended for one Adaptor will never be received by another, even across Adaptor restarts.
Method Summary | |
---|---|
String |
getCurrentStatus()
Return the adaptor's state Should not include class name or byte offset, which are written by caller. |
String |
getType()
|
void |
hardStop()
Deprecated. |
String |
parseArgs(String params)
Parse args, return stream name. |
long |
shutdown()
Deprecated. |
long |
shutdown(AdaptorShutdownPolicy shutdownPolicy)
Signals this adaptor to come to an orderly stop. |
void |
start(String adaptorID,
String type,
long offset,
ChunkReceiver dest,
AdaptorManager c)
Start this adaptor |
Method Detail |
---|
void start(String adaptorID, String type, long offset, ChunkReceiver dest, AdaptorManager c) throws AdaptorException
type
- the application type, who is starting this adaptorstatus
- the status string to use for configuration.offset
- the stream offset of the first byte sent by this adaptor
AdaptorException
String getCurrentStatus()
String getType()
String parseArgs(String params)
@Deprecated long shutdown() throws AdaptorException
AdaptorException
long shutdown(AdaptorShutdownPolicy shutdownPolicy) throws AdaptorException
AdaptorException
@Deprecated void hardStop() throws AdaptorException
AdaptorException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |