com.illposed.osc
Class OSCPortIn

java.lang.Object
  extended by com.illposed.osc.OSCPort
      extended by com.illposed.osc.OSCPortIn
All Implemented Interfaces:
java.lang.Runnable

public class OSCPortIn
extends OSCPort
implements java.lang.Runnable

The Class OSCPortIn.


Field Summary
 
Fields inherited from class com.illposed.osc.OSCPort
defaultSCLangOSCPort, defaultSCOSCPort
 
Constructor Summary
OSCPortIn(int port)
          Create an OSCPort that listens on port.
 
Method Summary
 void addListener(java.lang.String anAddress, OSCListener listener)
          Register the listener for incoming OSCPackets addressed to an Address.
 void close()
          Close the socket and free-up resources.
 boolean isListening()
          Am I listening for packets?.
 void run()
          Run.
 void startListening()
          Start listening for incoming OSCPackets.
 void stopListening()
          Stop listening for incoming OSCPackets.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OSCPortIn

public OSCPortIn(int port)
          throws java.net.SocketException
Create an OSCPort that listens on port.

Parameters:
port - the port
Throws:
java.net.SocketException - the socket exception
Method Detail

addListener

public void addListener(java.lang.String anAddress,
                        OSCListener listener)
Register the listener for incoming OSCPackets addressed to an Address.

Parameters:
anAddress - the address to listen for
listener - the object to invoke when a message comes in

close

public void close()
Close the socket and free-up resources. It's recommended that clients call this when they are done with the port.

Overrides:
close in class OSCPort

isListening

public boolean isListening()
Am I listening for packets?.

Returns:
true, if is listening

run

public void run()
Run.

Specified by:
run in interface java.lang.Runnable
See Also:
Runnable.run()

startListening

public void startListening()
Start listening for incoming OSCPackets.


stopListening

public void stopListening()
Stop listening for incoming OSCPackets.