|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.superhac.JXBStreamer.Core.XBMSPServer
public class XBMSPServer
This is the main class that is used for running a XBMSP server. The server uses non-blocking socket IO and runs as a thread.
More information can be found at Superhac.com
Constructor Summary | |
---|---|
XBMSPServer()
Creates an instance of the XBMSP Server that runs as a thread. |
Method Summary | |
---|---|
protected int |
getMaximumClientIdleTime()
Gets the maximum client idle time before being disconnected by the server. |
int |
getPort()
Gets the binding port for the XBMSP server. |
protected java.util.ArrayList<XBMSPServerMessageHandler> |
getServerMessageHandlers()
Returns an ArrayList of the message handlers. |
ServerStatus |
getServerStatus()
Provides detailed information about each connected client. |
boolean |
isAutoDiscoveryEnabled()
Is the the XBMSP server configured for the AutoDiscovery Service(UDP)? Clients can broadcast on port 1400 and the server will respond with identifying information that can be used to connect to the server. |
boolean |
isServerRunning()
Is the server running. |
void |
run()
Main loop of the Server running as a Thread. |
void |
setAutoDiscoveryEnabled(boolean autoDiscoveryEnabled)
Clients can broadcast on port 1400 and the server will respond with identifying information that can be used to connect to the server. |
protected void |
setMaximumClientIdleTime(int maximumClientIdleTime)
Sets the maximum client idle time before being disconnected by the server. |
void |
setPort(int port)
Set the port number the server will listen on. |
void |
setVirtualRoot(java.util.ArrayList<java.io.File> virtualRoot)
Set the virtual root directory. |
void |
startServer()
Starts the server so it can recieve incoming connections. |
void |
stopServer()
Stops the server from accepting connections and also disconnects any connected clients. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XBMSPServer()
Method Detail |
---|
public void run()
run
in interface java.lang.Runnable
public ServerStatus getServerStatus()
public boolean isServerRunning()
public void stopServer()
public void startServer()
public int getPort()
public void setPort(int port)
port
- The port number the server will bind to.public boolean isAutoDiscoveryEnabled()
public void setAutoDiscoveryEnabled(boolean autoDiscoveryEnabled)
autoDiscoveryEnabled
- True if it should be enabled and false if not.public void setVirtualRoot(java.util.ArrayList<java.io.File> virtualRoot)
virtualRoot
- An arraylist of files that make up the virtual root directoryprotected java.util.ArrayList<XBMSPServerMessageHandler> getServerMessageHandlers()
protected int getMaximumClientIdleTime()
protected void setMaximumClientIdleTime(int maximumClientIdleTime)
maximumClientIdleTime
- The maximum amount of idle time before the server disconnects
the client.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |