|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface OSCChannel
A collection of common constants and methods that apply to all kinds of OSC communicators.
Formely being abstract superclass AbstractOSCCommunicator
of OSCTransmitter
and
OSCReceiver
, the functionality has been reduced and converted to an interface as of v0.30.
The method for getting a socket's DatagramChannel
has been removed in the course of TCP integration, also with
keeping in mind the possible future integration of other channel types such as FileChannel
or PipeChannel
.
Field Summary | |
---|---|
static int |
DEFAULTBUFSIZE
The default buffer size (in bytes) and maximum OSC packet size (8K at the moment). |
static int |
kDumpBoth
Dump mode: dump messages both in text and hex view |
static int |
kDumpHex
Dump mode: dump messages in hex (binary) view |
static int |
kDumpOff
Dump mode: do not dump messages |
static int |
kDumpText
Dump mode: dump messages in text formatting |
static String |
TCP
Protocol type : transmission control protocol. |
static String |
UDP
Protocol type : user datagram protocol. |
Method Summary | |
---|---|
void |
dispose()
Disposes the resources associated with the OSC communicator. |
void |
dumpOSC(int mode,
PrintStream stream)
Changes the way processed OSC messages are printed to the standard err console. |
int |
getBufferSize()
Queries the buffer size used for coding or decoding OSC messages. |
OSCPacketCodec |
getCodec()
Queries the codec used in packet coding and decoding. |
InetSocketAddress |
getLocalAddress()
Queries the communicator's local socket address. |
String |
getProtocol()
Queries the transport protocol used by this communicator. |
void |
setBufferSize(int size)
Adjusts the buffer size for OSC messages. |
void |
setCodec(OSCPacketCodec c)
Specifies which codec is used in packet coding and decoding. |
Field Detail |
---|
static final String UDP
static final String TCP
static final int kDumpOff
static final int kDumpText
static final int kDumpHex
static final int kDumpBoth
static final int DEFAULTBUFSIZE
Method Detail |
---|
String getProtocol()
UDP
or TCP
UDP
,
TCP
InetSocketAddress getLocalAddress() throws IOException
getHostName()
(or for the IP getAddress().getHostAddress()
)
and getPort()
.
IOException
- if the local host could not be resolvedInetSocketAddress.getHostName()
,
InetSocketAddress.getAddress()
,
InetSocketAddress.getPort()
,
getProtocol()
void setBufferSize(int size)
size
- the new size in bytes.getBufferSize()
int getBufferSize()
setBufferSize( int )
void dumpOSC(int mode, PrintStream stream)
mode
- one of kDumpOff
(don't dump, default),
kDumpText
(dump human readable string),
kDumpHex
(hexdump), or
kDumpBoth
(both text and hex)stream
- the stream to print on, or null
which
is shorthand for System.err
kDumpOff
,
kDumpText
,
kDumpHex
,
kDumpBoth
void dispose()
void setCodec(OSCPacketCodec c)
c
- the codec to useOSCPacketCodec getCodec()
OSCPacketCodec.getDefaultCodec()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |