jmri.jmris
Class JmriServer

Show UML class diagram
java.lang.Object
  extended by jmri.jmris.JmriServer
Direct Known Subclasses:
JmriSRCPServer, JsonServer, SimpleServer

public class JmriServer
extends Object

This is the main JMRI Server implementation. It starts a thread for each client.


Nested Class Summary
protected  class JmriServer.ClientListener
           
(package private)  class JmriServer.newClientListener
           
 
Field Summary
protected  ArrayList<JmriServer.ClientListener> connectedClientThreads
           
protected  ServerSocket connectSocket
           
(package private) static org.slf4j.Logger log
           
protected  int portNo
           
protected  ZeroConfService service
           
protected  ShutDownTask shutDownTask
           
protected  int timeout
           
 
Constructor Summary
JmriServer()
           
JmriServer(int port)
           
JmriServer(int port, int timeout)
           
 
Method Summary
protected  void advertise()
           
protected  void advertise(String type)
           
 void handleClient(DataInputStream inStream, DataOutputStream outStream)
           
static JmriServer instance()
           
 void start()
           
 void stop()
           
 void stopClient(DataInputStream inStream, DataOutputStream outStream)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

portNo

protected int portNo

timeout

protected int timeout

connectSocket

protected ServerSocket connectSocket

service

protected ZeroConfService service

shutDownTask

protected ShutDownTask shutDownTask

connectedClientThreads

protected ArrayList<JmriServer.ClientListener> connectedClientThreads

log

static org.slf4j.Logger log
Constructor Detail

JmriServer

public JmriServer()

JmriServer

public JmriServer(int port)

JmriServer

public JmriServer(int port,
                  int timeout)
Method Detail

instance

public static JmriServer instance()

start

public void start()

advertise

protected void advertise()

advertise

protected void advertise(String type)

stop

public void stop()

handleClient

public void handleClient(DataInputStream inStream,
                         DataOutputStream outStream)
                  throws IOException
Throws:
IOException

stopClient

public void stopClient(DataInputStream inStream,
                       DataOutputStream outStream)
                throws IOException
Throws:
IOException


Copyright © 1997-2013 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.

Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: Get JMRI Model Railroad Interface at SourceForge.net. Fast, secure and Free Open Source software downloads