| Modifier and Type | Field and Description |
|---|---|
AIRS_remote |
airs
Reference to
AIRS_remote service |
boolean |
connected
Flag if connected (true) or not (false)
|
| Constructor and Description |
|---|
EventComponent() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
Bye(com.airs.platform.DIALOG_INFO dialog,
Callback callback)
Terminates existing dialog
|
boolean |
Confirm(com.airs.platform.DIALOG_INFO dialog_info,
String ret_code)
sends confirmation within existing dialog
|
boolean |
Confirm(com.airs.platform.Method method,
String ret_code)
sends confirmation outside of any existing dialog, using the information from the old method
|
boolean |
Notify(short dialog_id,
byte[] event_body,
Callback callback)
Sends notification in subscription dialog
|
com.airs.platform.DIALOG_INFO |
Publish(byte[] TO,
byte[] event_name,
byte[] event_body,
int Expires,
Callback callback)
Establishes a new PUBLISH dialog
|
boolean |
Publish(com.airs.platform.DIALOG_INFO dialog,
byte[] TO,
byte[] event_name,
byte[] event_body,
int Expires)
Sends a PUBLISH method in an existing dialog
|
boolean |
registerEventServer(Callback callback,
String event_name_string)
Register an event server with a given Callback for a given event name
|
void |
run()
Runnable thread of this class for receiving methods from remote application server
|
boolean |
startEC(AIRS_remote airs,
String IPAddress,
String IPPort)
Start the EventComponent after being instantiated
|
void |
stop()
Stop the EventComponent
|
com.airs.platform.DIALOG_INFO |
Subscribe(byte[] TO,
byte[] event_name,
byte[] event_body,
int body_length,
int Expires,
Callback callback)
Establishes a SUBSCRIBE dialog
|
public AIRS_remote airs
AIRS_remote servicepublic boolean connected
public boolean startEC(AIRS_remote airs, String IPAddress, String IPPort)
airs - Reference to the AIRS_remote service which started this componentIPAddress - String with the IP address to connect toIPPort - Port to connect to at the given IP addresspublic void run()
public void stop()
public boolean registerEventServer(Callback callback, String event_name_string)
callback - Reference to the Callback for this eventevent_name_string - String for the event name being registeredpublic com.airs.platform.DIALOG_INFO Subscribe(byte[] TO,
byte[] event_name,
byte[] event_body,
int body_length,
int Expires,
Callback callback)
TO - byte array with the name to send this to (usually 'application server')event_name - byte array with the event name being subscribed toevent_body - byte array with the event bodybody_length - length of the event body arrayExpires - time to expire in millisecondscallback - Reference to the Callback for this dialogpublic boolean Notify(short dialog_id,
byte[] event_body,
Callback callback)
dialog_id - identifier for the dialog being usedevent_body - byte array with the event body being sentcallback - Reference to the Callback being notified upon completionpublic com.airs.platform.DIALOG_INFO Publish(byte[] TO,
byte[] event_name,
byte[] event_body,
int Expires,
Callback callback)
TO - byte array with the name to send this to (usually 'application server')event_name - byte array with the event name being subscribed toevent_body - byte array with the event bodyExpires - time to expire in millisecondscallback - Reference to the Callback for this dialogpublic boolean Publish(com.airs.platform.DIALOG_INFO dialog,
byte[] TO,
byte[] event_name,
byte[] event_body,
int Expires)
dialog - Reference to the DIALOG_INFO that holds the dialog information to be usedTO - byte array with the name to send this to (usually 'application server')event_name - byte array with the event name being subscribed toevent_body - byte array with the event bodyExpires - time to expire in millisecondspublic boolean Confirm(com.airs.platform.Method method,
String ret_code)
method - Reference to the Method being re-usedret_code - Return code being inserted into the CONFIRM methodpublic boolean Confirm(com.airs.platform.DIALOG_INFO dialog_info,
String ret_code)
dialog_info - Reference to the DIALOG_INFO of the dialog being usedret_code - Return code being inserted into the CONFIRM method