Package org.astrogrid.samp.xmlrpc
Class HubMode
- java.lang.Object
-
- org.astrogrid.samp.xmlrpc.HubMode
-
- Direct Known Subclasses:
HubMode.BrokenHubMode
public abstract class HubMode extends java.lang.ObjectDeprecated.useHubServiceModewithHubinsteadSpecifies a particular hub implementation for use withHubRunner.- Since:
- 20 Nov 2008
- Author:
- Mark Taylor
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classHubMode.BrokenHubModeDeprecated.HubMode implemenetation for modes which cannot be used because they rely on classes unavailable at runtime.
-
Field Summary
Fields Modifier and Type Field Description static HubModeCLIENT_GUIDeprecated.Hub mode with a GUI representation of connected clients.private booleanisDaemon_Deprecated.private static HubMode[]KNOWN_MODESDeprecated.Array of available hub modes.private static java.util.logging.Loggerlogger_Deprecated.static HubModeMESSAGE_GUIDeprecated.Hub mode with a GUI representation of clients and messages.private java.lang.Stringname_Deprecated.static HubModeNO_GUIDeprecated.Hub mode with no GUI representation of hub operations.
-
Constructor Summary
Constructors Constructor Description HubMode(java.lang.String name, boolean isDaemon)Deprecated.Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description (package private) static voidconfigureHubWindow(javax.swing.JFrame frame, HubRunner[] runners)Deprecated.Used to perform common configuration of hub display windows for GUI-type hub modes.private static voidconfigureWindowBasic(javax.swing.JFrame frame, HubRunner[] runners)Deprecated.Performs common configuration of hub display window without system tray functionality.private static voidconfigureWindowForSysTray(javax.swing.JFrame frame, HubRunner[] runners, SysTray sysTray)Deprecated.Performs common configuration of hub display window with system tray functionality.private static HubModecreateBasicHubMode(java.lang.String name)Deprecated.Constructs a mode for BasicHubService.private static HubModecreateGuiHubMode(java.lang.String name)Deprecated.Constructs a mode for GuiHubService.(package private) abstract HubServicecreateHubService(java.util.Random random, HubRunner[] runners)Deprecated.Returns a new HubService object.private static HubModecreateMessageTrackerHubMode(java.lang.String name)Deprecated.Constructs a mode for MessageTrackerHubService.static HubMode[]getAvailableModes()Deprecated.Returns an array of the hub modes which can actually be used.static HubModegetModeFromName(java.lang.String name)Deprecated.Returns one of the known modes which has a name as given.(package private) java.lang.StringgetName()Deprecated.Returns this mode's name.(package private) booleanisDaemon()Deprecated.Indicates whether the hub service will start only daemon threads.java.lang.StringtoString()Deprecated.
-
-
-
Field Detail
-
name_
private final java.lang.String name_
Deprecated.
-
isDaemon_
private final boolean isDaemon_
Deprecated.
-
logger_
private static final java.util.logging.Logger logger_
Deprecated.
-
NO_GUI
public static final HubMode NO_GUI
Deprecated.Hub mode with no GUI representation of hub operations.
-
CLIENT_GUI
public static final HubMode CLIENT_GUI
Deprecated.Hub mode with a GUI representation of connected clients.
-
MESSAGE_GUI
public static HubMode MESSAGE_GUI
Deprecated.Hub mode with a GUI representation of clients and messages.
-
KNOWN_MODES
private static final HubMode[] KNOWN_MODES
Deprecated.Array of available hub modes.
-
-
Method Detail
-
createHubService
abstract HubService createHubService(java.util.Random random, HubRunner[] runners)
Deprecated.Returns a new HubService object.- Parameters:
random- random number generatorrunners- 1-element array of HubRunners - this should be populated with the runner once it has been constructed
-
isDaemon
boolean isDaemon()
Deprecated.Indicates whether the hub service will start only daemon threads. If it returns true, the caller may need to make sure that the JVM doesn't stop too early.- Returns:
- true iff no non-daemon threads will be started by the service
-
getName
java.lang.String getName()
Deprecated.Returns this mode's name.- Returns:
- mode name
-
toString
public java.lang.String toString()
Deprecated.- Overrides:
toStringin classjava.lang.Object
-
getModeFromName
public static HubMode getModeFromName(java.lang.String name)
Deprecated.Returns one of the known modes which has a name as given.- Parameters:
name- mode name (case-insensitive)- Returns:
- mode with given name, or null if none known
-
getAvailableModes
public static HubMode[] getAvailableModes()
Deprecated.Returns an array of the hub modes which can actually be used.- Returns:
- available mode list
-
configureHubWindow
static void configureHubWindow(javax.swing.JFrame frame, HubRunner[] runners)Deprecated.Used to perform common configuration of hub display windows for GUI-type hub modes.- Parameters:
frame- hub windowrunners- 1-element array which will contain an associated hub runner object if one exists
-
configureWindowBasic
private static void configureWindowBasic(javax.swing.JFrame frame, HubRunner[] runners)Deprecated.Performs common configuration of hub display window without system tray functionality.- Parameters:
frame- hub windowrunners- 1-element array which will contain an associated hub runner object if one exists
-
configureWindowForSysTray
private static void configureWindowForSysTray(javax.swing.JFrame frame, HubRunner[] runners, SysTray sysTray) throws java.awt.AWTExceptionDeprecated.Performs common configuration of hub display window with system tray functionality.- Parameters:
frame- hub windowrunners- 1-element array which will contain an associated hub runner object if one existssysTray- system tray facade object- Throws:
java.awt.AWTException
-
createBasicHubMode
private static HubMode createBasicHubMode(java.lang.String name)
Deprecated.Constructs a mode for BasicHubService.- Returns:
- non-gui mode
-
createGuiHubMode
private static HubMode createGuiHubMode(java.lang.String name)
Deprecated.Constructs a mode for GuiHubService.- Returns:
- mode without message tracking
-
createMessageTrackerHubMode
private static HubMode createMessageTrackerHubMode(java.lang.String name)
Deprecated.Constructs a mode for MessageTrackerHubService.- Returns:
- mode with message tracking
-
-