adams.flow.core
Class AbstractWSClient

java.lang.Object
  extended by adams.core.ConsoleObject
      extended by adams.core.option.AbstractOptionHandler
          extended by adams.flow.core.AbstractActor
              extended by adams.flow.core.AbstractWSClient
All Implemented Interfaces:
AdditionalInformationHandler, CleanUpHandler, Debuggable, DebugOutputHandler, Destroyable, OptionHandler, QuickInfoSupporter, ShallowCopySupporter<AbstractActor>, SizeOfHandler, Stoppable, VariableChangeListener, ErrorHandler, Serializable, Comparable
Direct Known Subclasses:
WSSink, WSSource, WSTransformer

public abstract class AbstractWSClient
extends AbstractActor

Ancestor for webservice client actors.

Version:
$Revision: 5347 $
Author:
fracpete (fracpete at waikato dot ac dot nz)
See Also:
Serialized Form

Field Summary
protected  WebServiceClient m_Client
          the webservice client to use.
 
Fields inherited from class adams.flow.core.AbstractActor
FILE_EXTENSION, FILE_EXTENSION_GZ, m_Annotations, m_BackupState, m_DetectedObjectVariables, m_DetectedVariables, m_ErrorHandler, m_Executed, m_FullName, m_Headless, m_Name, m_Parent, m_Root, m_Self, m_Skip, m_StopFlowOnError, m_StopMessage, m_Stopped, m_StorageHandler, m_VariablesUpdated
 
Fields inherited from class adams.core.option.AbstractOptionHandler
m_DebugLevel, m_OptionManager
 
Constructor Summary
AbstractWSClient()
           
 
Method Summary
protected abstract  String checkClient(WebServiceClient value)
          Checks the client.
 void cleanUp()
          Cleans up the actor.
 String clientTipText()
          Returns the tip text for this property.
 void defineOptions()
          Adds options to the internal list of options.
protected  String doQuery()
          Queries the webservice.
 WebServiceClient getClient()
          Returns the webservice client in use.
protected abstract  WebServiceClient getDefaultClient()
          Returns the default client to use.
 String getQuickInfo()
          Returns a quick info about the actor, which will be displayed in the GUI.
protected  String postQuery()
          Hook method after the webservice got queried.
protected  String preQuery()
          Hook method before the webservice gets queried.
protected  String query()
          Queries the webservice.
 void setClient(WebServiceClient value)
          Sets the webservice client to use.
 String setUp()
          Initializes the item for flow execution.
 
Methods inherited from class adams.flow.core.AbstractActor
annotationsTipText, backupState, canInspectOptions, canPerformSetUpCheck, compareTo, debug, destroy, doExecute, equals, execute, findVariables, findVariables, findVariables, forceVariables, forCommandLine, forName, getAdditionalInformation, getAnnotations, getDefaultName, getDetectedVariables, getErrorHandler, getFlowActors, getFullName, getName, getNextSibling, getParent, getPreviousSibling, getRoot, getSkip, getStopFlowOnError, getStopMessage, getStorageHandler, getVariables, handleError, hasErrorHandler, hasStopMessage, index, initialize, isBackedUp, isExecuted, isFinished, isHeadless, isStopped, nameTipText, performSetUpChecks, postExecute, preExecute, pruneBackup, pruneBackup, reset, restoreState, setAnnotations, setErrorHandler, setHeadless, setName, setParent, setSkip, setStopFlowOnError, setVariables, shallowCopy, shallowCopy, sizeOf, skipTipText, stopExecution, stopExecution, stopFlowOnErrorTipText, updateDetectedVariables, updatePrefix, updateVariables, variableChanged, wrapUp
 
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, debug, debugLevelTipText, finishInit, getDebugLevel, getOptionManager, globalInfo, isDebugOn, newOptionManager, setDebugLevel, toCommandLine, toString
 
Methods inherited from class adams.core.ConsoleObject
getDebugging, getSystemErr, getSystemOut
 
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.

Constructor Detail

AbstractWSClient

public AbstractWSClient()
Method Detail

defineOptions

public void defineOptions()
Adds options to the internal list of options.

Specified by:
defineOptions in interface OptionHandler
Overrides:
defineOptions in class 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:
getQuickInfo in interface QuickInfoSupporter
Overrides:
getQuickInfo in class AbstractActor
Returns:
null if no info available, otherwise short string

setUp

public String setUp()
Initializes the item for flow execution.

Overrides:
setUp in class 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:
cleanUp in interface CleanUpHandler
Overrides:
cleanUp in class AbstractActor


Copyright © 2012 University of Waikato, Hamilton, NZ. All Rights Reserved.