public class JMConnection
extends Object
The basic job of this listener is to convert data between the external JSON representation and the MessageSight plug-in methods. The json_msg sample protocol is conceptually very similar to the natively supported messaging protocols. So this example demonstrates the mechanisms for a protocol plug-in but it does relatively simple conversions from one representation to another.
Modifier and Type | Field and Description |
---|---|
static String |
COPYRIGHT |
Modifier and Type | Method and Description |
---|---|
void |
onClose(int rc,
String reason)
Handle the close of a connection.
|
void |
onComplete(Object obj,
int rc,
String message)
Handle a completion event.
|
void |
onConnected(int rc,
String reason)
Handle the completion of a connection and send a connection message to the client.
|
int |
onData(byte[] data,
int offset,
int length)
Handle data from the client.
|
void |
onGetMessage(Object correlate,
int rc,
ImaMessage msg)
Handle a message from the server.
|
void |
onHttpData(String op,
String path,
String query,
String content_type,
byte[] data)
This plug-in does not support HTTP interactions.
|
boolean |
onLivenessCheck()
Handle a request to check if the connection is alive.
|
void |
onMessage(ImaSubscription sub,
ImaMessage msg)
Handle a message from the server.
|
String |
toString()
Give a simple string representation of this connection listener object.
|
public static final String COPYRIGHT
public void onClose(int rc, String reason)
com.ibm.ima.plugin.ImaConnectionListener#onClose(int, java.lang.String)
public boolean onLivenessCheck()
com.ibm.ima.plugin.ImaConnectionListener#onLivenessCheck()
public int onData(byte[] data, int offset, int length)
com.ibm.ima.plugin.ImaConnectionListener#onData(byte[])
public void onConnected(int rc, String reason)
com.ibm.ima.plugin.ImaConnectionListener#onConnected(int, java.lang.String)
public void onMessage(ImaSubscription sub, ImaMessage msg)
com.ibm.ima.plugin.ImaConnectionListener#onMessage(com.ibm.ima.plugin.ImaSubscription, com.ibm.ima.plugin.ImaMessage)
public void onGetMessage(Object correlate, int rc, ImaMessage msg)
com.ibm.ima.plugin.ImaConnectionListener#onMessage(com.ibm.ima.plugin.ImaSubscription, com.ibm.ima.plugin.ImaMessage)
public void onComplete(Object obj, int rc, String message)
com.ibm.ima.plugin.ImaConnectionListener#onComplete(java.lang.Object, int, java.lang.String)
public String toString()
toString
in class Object
Object.toString()
public void onHttpData(String op, String path, String query, String content_type, byte[] data)
com.ibm.ima.plugin.ImaConnectionListener#onHttpData(java.lang.String, java.lang.String, java.lang.String, java.lang.String, byte[])
Copyright © Contributors to the Eclipse Foundation 2014-2021