Package adams.flow.websocket.client
Class AbstractWebSocketClientGenerator
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.websocket.client.AbstractWebSocketClientGenerator
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,QuickInfoSupporter,SizeOfHandler,WebSocketClientGenerator,Serializable
- Direct Known Subclasses:
SimpleSendGenerator,SimpleSendWithQueueGenerator
public abstract class AbstractWebSocketClientGenerator extends AbstractOptionHandler implements WebSocketClientGenerator, QuickInfoSupporter
Ancestor for client generators.- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected BaseURIm_URLthe URL to connect to.-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description AbstractWebSocketClientGenerator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected Stringcheck()Hook method for performing checks.voiddefineOptions()Adds options to the internal list of options.protected abstract com.pusher.java_websocket.client.WebSocketClientdoGenerate()Generates the client.com.pusher.java_websocket.client.WebSocketClientgenerateClient()Generates the client.StringgetQuickInfo()Returns a quick info about the actor, which will be displayed in the GUI.BaseURIgetURL()Returns the URL to connect to.voidsetURL(BaseURI value)Sets the URL to connect to.StringURLTipText()Returns the tip text for this property.-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.Destroyable
destroy
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, getOptionManager, toCommandLine
-
-
-
-
Field Detail
-
m_URL
protected BaseURI m_URL
the URL to connect to.
-
-
Method Detail
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractOptionHandler
-
setURL
public void setURL(BaseURI value)
Sets the URL to connect to.- Parameters:
value- the URL
-
getURL
public BaseURI getURL()
Returns the URL to connect to.- Returns:
- the URL
-
URLTipText
public String URLTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.- Specified by:
getQuickInfoin interfaceQuickInfoSupporter- Returns:
- null if no info available, otherwise short string
-
check
protected String check()
Hook method for performing checks.
Default implementation returns null.- Returns:
- null if successful, otherwise error message
-
doGenerate
protected abstract com.pusher.java_websocket.client.WebSocketClient doGenerate()
Generates the client.- Returns:
- the client
-
generateClient
public com.pusher.java_websocket.client.WebSocketClient generateClient()
Generates the client.- Specified by:
generateClientin interfaceWebSocketClientGenerator- Returns:
- the generated client instance
- Throws:
IllegalStateException- if checks failed- See Also:
check()
-
-