Package adams.flow.core
Class AbstractPyroCall
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.core.AbstractPyroCall
-
- All Implemented Interfaces:
CleanUpHandler
,Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,QuickInfoSupporter
,SizeOfHandler
,FlowContextHandler
,PyroCall
,Serializable
- Direct Known Subclasses:
AbstractPyroSink
,AbstractPyroSource
,AbstractPyroStandalone
,AbstractPyroTransformer
public abstract class AbstractPyroCall extends AbstractOptionHandler implements PyroCall, QuickInfoSupporter
Ancestor for Pyro4 method calls.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Actor
m_FlowContext
the flow context.protected String
m_MethodName
the name of the method.protected PyroNameServer
m_NameServer
the nameserver.protected net.razorvine.pyro.PyroProxy
m_RemoteObject
the remote object.protected String
m_RemoteObjectName
the name of the remote object.-
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 AbstractPyroCall()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
cleanUp()
Cleans up data structures, frees up memory.void
defineOptions()
Adds options to the internal list of options.protected abstract String
doExecute()
Performs the actual call.String
execute()
Performs the call.protected String
getDefaultMethodName()
Returns the default method name.protected String
getDefaultRemoteObjectName()
Returns the default remote object name.Actor
getFlowContext()
Returns the flow context, if any.String
getMethodName()
Returns the name of the method to call.String
getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.String
getRemoteObjectName()
Returns the name of the remote object to use.String
methodNameTipText()
Returns the tip text for this property.protected String
postExecute()
After performing the actual call.protected String
preExecute()
Before performing the actual call.String
remoteObjectNameTipText()
Returns the tip text for this property.protected void
reset()
Resets the scheme.void
setFlowContext(Actor value)
Sets the flow context.void
setMethodName(String value)
Sets the name of the method to call.void
setRemoteObjectName(String value)
Sets the name of the remote object to use.String
setUp()
Configures the call.-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, initialize, loggingLevelTipText, newOptionManager, 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_RemoteObjectName
protected String m_RemoteObjectName
the name of the remote object.
-
m_MethodName
protected String m_MethodName
the name of the method.
-
m_FlowContext
protected transient Actor m_FlowContext
the flow context.
-
m_NameServer
protected transient PyroNameServer m_NameServer
the nameserver.
-
m_RemoteObject
protected transient net.razorvine.pyro.PyroProxy m_RemoteObject
the remote object.
-
-
Method Detail
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractOptionHandler
-
reset
protected void reset()
Description copied from class:AbstractOptionHandler
Resets the scheme. Derived classes must call this method in set-methods of parameters to assure the invalidation of previously generated data.- Overrides:
reset
in classAbstractOptionHandler
-
getDefaultRemoteObjectName
protected String getDefaultRemoteObjectName()
Returns the default remote object name.- Returns:
- the name
-
setRemoteObjectName
public void setRemoteObjectName(String value)
Sets the name of the remote object to use.- Specified by:
setRemoteObjectName
in interfacePyroCall
- Parameters:
value
- the name
-
getRemoteObjectName
public String getRemoteObjectName()
Returns the name of the remote object to use.- Specified by:
getRemoteObjectName
in interfacePyroCall
- Returns:
- the name
-
remoteObjectNameTipText
public String remoteObjectNameTipText()
Returns the tip text for this property.- Specified by:
remoteObjectNameTipText
in interfacePyroCall
- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getDefaultMethodName
protected String getDefaultMethodName()
Returns the default method name.- Returns:
- the name
-
setMethodName
public void setMethodName(String value)
Sets the name of the method to call.- Specified by:
setMethodName
in interfacePyroCall
- Parameters:
value
- the name
-
getMethodName
public String getMethodName()
Returns the name of the method to call.- Specified by:
getMethodName
in interfacePyroCall
- Returns:
- the name
-
methodNameTipText
public String methodNameTipText()
Returns the tip text for this property.- Specified by:
methodNameTipText
in interfacePyroCall
- 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:
getQuickInfo
in interfaceQuickInfoSupporter
- Returns:
- null if no info available, otherwise short string
-
setFlowContext
public void setFlowContext(Actor value)
Sets the flow context.- Specified by:
setFlowContext
in interfaceFlowContextHandler
- Parameters:
value
- the actor
-
getFlowContext
public Actor getFlowContext()
Returns the flow context, if any.- Specified by:
getFlowContext
in interfaceFlowContextHandler
- Returns:
- the actor, null if none available
-
setUp
public String setUp()
Configures the call.
-
preExecute
protected String preExecute()
Before performing the actual call. Attempts to obtain the remote object if no instance yet available.- Returns:
- null if successful, otherwise error message
-
doExecute
protected abstract String doExecute()
Performs the actual call.- Returns:
- null if successful, otherwise error message
-
postExecute
protected String postExecute()
After performing the actual call.
Default implementation does nothing, returns null.- Returns:
- null if successful, otherwise error message
-
execute
public String execute()
Performs the call.
-
cleanUp
public void cleanUp()
Cleans up data structures, frees up memory.- Specified by:
cleanUp
in interfaceCleanUpHandler
-
-