Package adams.flow.core
Class AbstractWSClient
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.core.AbstractActor
-
- adams.flow.core.AbstractWSClient
-
- All Implemented Interfaces:
adams.core.AdditionalInformationHandler,adams.core.CleanUpHandler,adams.core.Destroyable,adams.core.GlobalInfoSupporter,adams.core.logging.LoggingLevelHandler,adams.core.logging.LoggingSupporter,adams.core.option.OptionHandler,adams.core.QuickInfoSupporter,adams.core.ShallowCopySupporter<adams.flow.core.Actor>,adams.core.SizeOfHandler,adams.core.Stoppable,adams.core.StoppableWithFeedback,adams.core.VariablesInspectionHandler,adams.event.VariableChangeListener,adams.flow.core.Actor,adams.flow.core.ErrorHandler,Serializable,Comparable
- Direct Known Subclasses:
WSSink,WSSource,WSTransformer
public abstract class AbstractWSClient extends adams.flow.core.AbstractActorAncestor for webservice client actors.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected WebServiceClientm_Clientthe webservice client to use.-
Fields inherited from class adams.flow.core.AbstractActor
m_Annotations, m_BackupState, m_DetectedObjectVariables, m_DetectedVariables, m_ErrorHandler, m_Executed, m_Executing, m_ExecutionListeningSupporter, m_FullName, m_LoggingPrefix, m_Name, m_Parent, m_ScopeHandler, m_Self, m_Silent, m_Skip, m_StopFlowOnError, m_StopMessage, m_Stopped, m_StorageHandler, m_VariablesUpdated
-
-
Constructor Summary
Constructors Constructor Description AbstractWSClient()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract StringcheckClient(WebServiceClient value)Checks the client.voidcleanUp()Cleans up the actor.StringclientTipText()Returns the tip text for this property.voiddefineOptions()Adds options to the internal list of options.protected StringdoQuery()Queries the webservice.WebServiceClientgetClient()Returns the webservice client in use.protected abstract WebServiceClientgetDefaultClient()Returns the default client to use.StringgetQuickInfo()Returns a quick info about the actor, which will be displayed in the GUI.protected StringpostQuery()Hook method after the webservice got queried.protected StringpreQuery()Hook method before the webservice gets queried.protected Stringquery()Queries the webservice.voidsetClient(WebServiceClient value)Sets the webservice client to use.StringsetUp()Initializes the item for flow execution.-
Methods inherited from class adams.flow.core.AbstractActor
annotationsTipText, backupState, canInspectOptions, canPerformSetUpCheck, compareTo, configureLogger, destroy, doExecute, equals, execute, finalUpdateVariables, findVariables, findVariables, forceVariables, forCommandLine, forName, forName, getAdditionalInformation, getAnnotations, getDefaultName, getDetectedVariables, getErrorHandler, getFlowActors, getFlowExecutionListeningSupporter, getFullName, getName, getNextSibling, getParent, getParentComponent, getPreviousSibling, getRoot, getScopeHandler, getSilent, getSkip, getStopFlowOnError, getStopMessage, getStorageHandler, getVariables, handleError, handleException, hasErrorHandler, hasStopMessage, index, initialize, isBackedUp, isExecuted, isExecuting, isFinished, isHeadless, isStopped, nameTipText, performSetUpChecks, performVariableChecks, postExecute, preExecute, pruneBackup, pruneBackup, reset, restoreState, setAnnotations, setErrorHandler, setName, setParent, setSilent, setSkip, setStopFlowOnError, setVariables, shallowCopy, shallowCopy, silentTipText, sizeOf, skipTipText, stopExecution, stopExecution, stopFlowOnErrorTipText, updateDetectedVariables, updatePrefix, updateVariables, variableChanged, wrapUp
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
m_Client
protected WebServiceClient m_Client
the webservice client to use.
-
-
Method Detail
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceadams.core.option.OptionHandler- Overrides:
defineOptionsin classadams.flow.core.AbstractActor
-
getDefaultClient
protected abstract WebServiceClient getDefaultClient()
Returns the default client to use.- Returns:
- the client
-
checkClient
protected abstract String checkClient(WebServiceClient value)
Checks the client.- Parameters:
value- the client to check- Returns:
- null if accepted, otherwise error message
-
setClient
public void setClient(WebServiceClient value)
Sets the webservice client to use.- Parameters:
value- the webservice client to use
-
getClient
public WebServiceClient getClient()
Returns the webservice client in use.- Returns:
- the webservice client in use
-
clientTipText
public String clientTipText()
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 interfaceadams.flow.core.Actor- Specified by:
getQuickInfoin interfaceadams.core.QuickInfoSupporter- Overrides:
getQuickInfoin classadams.flow.core.AbstractActor- Returns:
- null if no info available, otherwise short string
-
setUp
public String setUp()
Initializes the item for flow execution.- Specified by:
setUpin interfaceadams.flow.core.Actor- Overrides:
setUpin classadams.flow.core.AbstractActor- Returns:
- null if everything is fine, otherwise error message
-
preQuery
protected String preQuery()
Hook method before the webservice gets queried.
Default implementation does nothing.- Returns:
- null if successful, otherwise error message
-
doQuery
protected String doQuery()
Queries the webservice.- Returns:
- null if successful, otherwise error message
-
postQuery
protected String postQuery()
Hook method after the webservice got queried.
Default implementation does nothing.- Returns:
- null if successful, otherwise error message
-
query
protected String query()
Queries the webservice.- Returns:
- null if successful, otherwise error message
- See Also:
preQuery(),doQuery(),postQuery()
-
cleanUp
public void cleanUp()
Cleans up the actor.- Specified by:
cleanUpin interfaceadams.flow.core.Actor- Specified by:
cleanUpin interfaceadams.core.CleanUpHandler- Overrides:
cleanUpin classadams.flow.core.AbstractActor
-
-