|
TPTP 4.5.0 Platform Project Public API Specification |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface IBaseAgent
IBaseAgent provides the interface for development of an Agent. This agent registers with the Agent Controller and provides datacollection services to the client.
| Method Summary | |
|---|---|
void |
addClient(int clientConnId,
TPTPAgentAccess accessMode)
Add the clients that are referecing this agent |
int |
addEventListener(java.lang.String eventsIID,
int listenerID,
int replyDest,
int replyContext)
|
int |
deregister()
Deregister from the Agent Controller. |
int |
getAgentID()
Return the agent connection id |
java.lang.String |
getAgentName()
Return the agent name |
java.lang.String |
getConfigValue()
Return the agent configuration information. |
long |
getProcessID()
Return the agent process id |
java.lang.String[] |
getSupportedInterfaces()
Return the list of interfaces serviced by the Agent |
java.lang.String |
getUUID()
|
void |
init()
|
boolean |
isRegistered()
Returns whether the agent registered successfully with Agent Controller |
int |
preRegisterInitialization()
Provides data exchange with the Agent Controller prior to Agent Registration |
void |
processCommand(ICommandFragment command)
Process the commands recieved by the agent The sub-classes must override this method to provide their command processing functionality |
void |
processCommandLine(java.lang.String[] argv)
|
int |
processDataProviderCommands(ICommandFragment cmd)
Sub classes should override this class for additional functionality |
int |
processEventProviderCommands(ICommandFragment cmd)
Sub classes should override this class for additional functionality |
int |
receiveData(int sourceId,
byte[] buffer,
int bufferLength)
ReceiveData from the Client |
int |
receiveData(int sourceId,
java.lang.String buffer,
int bufferLength)
ReceiveData from the Client |
int |
register()
Register the Agent with Agent Controller. |
void |
removeClient(int clientConnId)
|
int |
removeEventListener(java.lang.String eventsIID,
int listenerID,
int replyDest,
int replyContext)
|
void |
sendCommand(ICommandFragment outCommand)
|
void |
sendCommand(java.lang.String outCommand)
|
int |
sendData(int targetInstanceId,
byte[] buffer)
send the given data buffer to the given destination This method is used by the Remote Agent on the AgentController to send the data to the Client |
int |
sendData(int targetInstanceId,
byte[] buffer,
int offset,
int length)
send the given data buffer to the given destination This method is used by the Remote Agent on the AgentController to send the data to the Client |
int |
sendData(int targetInstanceId,
char[] buffer)
send the given data buffer to the given destination This method is used by the Remote Agent on the AgentController to send the data to the Client |
int |
sendEventNotifications(ICommandFragment cmd)
|
void |
setSupportedInterfaces(java.lang.String[] interfaceID)
Set the list of interfaces supported by the Agent, subclasses should override this method to customize their characteristics |
void |
waitForTermination()
This method is invoked by the Agent Controller if there are no referencing clients |
| Method Detail |
|---|
void init()
throws NativeLibraryNotFound
NativeLibraryNotFoundboolean isRegistered()
int deregister()
throws AgentControllerUnavailableException
AgentControllerUnavailableException
int register()
throws AgentControllerUnavailableException
AgentControllerUnavailableException
int preRegisterInitialization()
throws AgentControllerUnavailableException
AgentControllerUnavailableExceptionvoid processCommand(ICommandFragment command)
command -
int sendData(int targetInstanceId,
char[] buffer)
throws DataChannelConnectionException,
AgentControllerUnavailableException
targetInstanceId - - send data to the target connection idbuffer - - data to be sent
DataChannelConnectionException
AgentControllerUnavailableException
int sendData(int targetInstanceId,
byte[] buffer)
throws DataChannelConnectionException,
AgentControllerUnavailableException
targetInstanceId - - send data to the target connection idbuffer - - data to be sent
DataChannelConnectionException
AgentControllerUnavailableException
int sendData(int targetInstanceId,
byte[] buffer,
int offset,
int length)
throws DataChannelConnectionException,
AgentControllerUnavailableException
targetInstanceId - - send data to the target connection idbuffer - - data to be sentoffset - - start offset in the datalength - - number of bytes to send
DataChannelConnectionException
AgentControllerUnavailableException
int receiveData(int sourceId,
java.lang.String buffer,
int bufferLength)
throws DataChannelConnectionException,
AgentControllerUnavailableException
sourceId - buffer - bufferLength -
DataChannelConnectionException, - NotConnectedException
DataChannelConnectionException
AgentControllerUnavailableException
int receiveData(int sourceId,
byte[] buffer,
int bufferLength)
throws DataChannelConnectionException,
AgentControllerUnavailableException
sourceId - buffer - bufferLength -
DataChannelConnectionException, - NotConnectedException
DataChannelConnectionException
AgentControllerUnavailableExceptionvoid waitForTermination()
long getProcessID()
java.lang.String getConfigValue()
java.lang.String getAgentName()
int getAgentID()
int addEventListener(java.lang.String eventsIID,
int listenerID,
int replyDest,
int replyContext)
eventsIID - listenerID - replyDest - replyContext -
int removeEventListener(java.lang.String eventsIID,
int listenerID,
int replyDest,
int replyContext)
eventsIID - listenerID - replyDest - replyContext -
java.lang.String[] getSupportedInterfaces()
void setSupportedInterfaces(java.lang.String[] interfaceID)
interfaceID - set the interfaces supported by the agent
int sendEventNotifications(ICommandFragment cmd)
throws AgentControllerUnavailableException
cmd - containing the command for event notification
AgentControllerUnavailableExceptionint processEventProviderCommands(ICommandFragment cmd)
cmd -
int processDataProviderCommands(ICommandFragment cmd)
cmd -
void addClient(int clientConnId,
TPTPAgentAccess accessMode)
clientConnId - - Add the client to the listener listaccessMode - - Agent Reference mode of the clientvoid removeClient(int clientConnId)
clientConnId -
void sendCommand(java.lang.String outCommand)
throws AgentControllerUnavailableException
outCommand - respHandler -
AgentControllerUnavailableException
void sendCommand(ICommandFragment outCommand)
throws AgentControllerUnavailableException
outCommand - respHandler - - Command handler to process the response
AgentControllerUnavailableExceptionjava.lang.String getUUID()
void processCommandLine(java.lang.String[] argv)
|
TPTP 4.5.0 Platform Project Public API Specification |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||