com.superhac.JXBStreamer.Core
Class XBMSPDiscoverServer

java.lang.Object
  extended by java.lang.Thread
      extended by com.superhac.JXBStreamer.Core.XBMSPDiscoverServer
All Implemented Interfaces:
java.lang.Runnable

public class XBMSPDiscoverServer
extends java.lang.Thread

This class handles the server socket connections for the XBMSP Discovery protocol. By default it listens on port 1400 for UDP requests. The server responds with connection information for connecting to the XBMSPServer instance. This runs as a thread started by itself.

More information can be found at Superhac.com


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
protected XBMSPDiscoverServer(int port)
          Create an instance of the server
 
Method Summary
 void run()
           
protected  void setPort(int port)
          Set the port number of the server
 void startServer()
          Start the server.
protected  void stopServer()
          Stop the server
protected  void stopThread()
          Terminate the thread.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XBMSPDiscoverServer

protected XBMSPDiscoverServer(int port)
Create an instance of the server

Parameters:
port - The port the server should listen on.
Method Detail

run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

startServer

public void startServer()
Start the server.


stopServer

protected void stopServer()
Stop the server


stopThread

protected void stopThread()
Terminate the thread. If done this instance of XBMSPDiscoverServer should be destoryed.


setPort

protected void setPort(int port)
Set the port number of the server

Parameters:
port - the port number the server should listen on for the UDP requests.