Package javaforce.jbus
Class JBusServer
java.lang.Object
java.lang.Thread
javaforce.jbus.JBusServer
- All Implemented Interfaces:
Runnable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsFields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
ConstructorsConstructorDescriptionCreate new server on port 777.JBusServer(int port) Create new server on specified port. -
Method Summary
Modifier and TypeMethodDescriptionvoidBroadcasts to call clients that start with the pack.voidclose()Close down server.intstatic voidstatic booleanpresent()Checks if a JBusServer is running.booleanready()Returns server ready state.voidrun()static voidserviceStart(String[] args) static voidMethods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, isVirtual, join, join, join, join, ofPlatform, ofVirtual, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, sleep, start, startVirtualThread, stop, suspend, threadId, toString, yield
-
Field Details
-
port
public static int port -
ready
public static volatile boolean ready
-
-
Constructor Details
-
JBusServer
public JBusServer()Create new server on port 777. -
JBusServer
public JBusServer(int port) Create new server on specified port.
-
-
Method Details
-
getClientCount
public int getClientCount() -
run
public void run() -
close
public void close()Close down server. -
ready
public boolean ready()Returns server ready state. -
broadcast
Broadcasts to call clients that start with the pack. -
present
public static boolean present()Checks if a JBusServer is running. -
main
-
serviceStart
-
serviceStop
public static void serviceStop()
-