|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlcm.lcm.TCPProvider
public class TCPProvider
LCM provider for the tcpq: URL. All messages are sent to a central "hub" process (that must be started separately), which will relay the messages to all other processes. TCPService is an implementation of the hub process. The tcpq:// protocol is NOT suitable for real-time or high-bandwidth traffic. It is specifically designed for playing back a log file in a post-processing context (i.e., play back the log as fast as possible, but without dropping anything).
Field Summary | |
---|---|
static int |
MAGIC_CLIENT
|
static int |
MAGIC_SERVER
|
static int |
MESSAGE_TYPE_PUBLISH
|
static int |
MESSAGE_TYPE_SUBSCRIBE
|
static int |
MESSAGE_TYPE_UNSUBSCRIBE
|
static int |
VERSION
|
Constructor Summary | |
---|---|
TCPProvider(LCM lcm,
URLParser up)
|
Method Summary | |
---|---|
void |
close()
close() will be called when the application no longer requires the provider and wishes to free the resources used by the provider. |
void |
publish(java.lang.String channel,
byte[] data,
int offset,
int length)
Publish a message synchronously. |
void |
subscribe(java.lang.String channel)
subscribe() will be called when a channel subscription has been made. |
void |
unsubscribe(java.lang.String channel)
unsubscribe() will be called when a channel subscription is cancelled. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MAGIC_SERVER
public static final int MAGIC_CLIENT
public static final int VERSION
public static final int MESSAGE_TYPE_PUBLISH
public static final int MESSAGE_TYPE_SUBSCRIBE
public static final int MESSAGE_TYPE_UNSUBSCRIBE
Constructor Detail |
---|
public TCPProvider(LCM lcm, URLParser up) throws java.io.IOException
java.io.IOException
Method Detail |
---|
public void publish(java.lang.String channel, byte[] data, int offset, int length)
publish
in interface Provider
public void subscribe(java.lang.String channel)
Provider
subscribe
in interface Provider
public void unsubscribe(java.lang.String channel)
Provider
unsubscribe
in interface Provider
public void close()
Provider
close
in interface Provider
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |