adams.flow.webservice
Class AbstractWebServiceClientSourceWithGlobalTransformer<O>

java.lang.Object
  extended by adams.core.ConsoleObject
      extended by adams.core.option.AbstractOptionHandler
          extended by adams.flow.webservice.AbstractWebServiceClientSource<O>
              extended by adams.flow.webservice.AbstractWebServiceClientSourceWithGlobalTransformer<O>
Type Parameters:
O - the type of the generated output data
All Implemented Interfaces:
CleanUpHandler, Debuggable, Destroyable, OptionHandler, SizeOfHandler, GlobalTransformerSupport<O,O>, WebServiceClient, WebServiceClientProducer<O>, Serializable

public abstract class AbstractWebServiceClientSourceWithGlobalTransformer<O>
extends AbstractWebServiceClientSource<O>
implements GlobalTransformerSupport<O,O>

Ancestor for webservice source clients that post-process the retrieved data with a subflow.

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

Field Summary
protected  AbstractActor m_ActualTransformer
          the actual transformer to use.
protected  GlobalActorReference m_Transformer
          the global transformer.
 
Fields inherited from class adams.flow.webservice.AbstractWebServiceClientSource
m_Owner
 
Fields inherited from class adams.core.option.AbstractOptionHandler
m_DebugLevel, m_OptionManager
 
Constructor Summary
AbstractWebServiceClientSourceWithGlobalTransformer()
           
 
Method Summary
 O applyTransformer(O data)
          Applies the transformer to the data.
 void defineOptions()
          Adds options to the internal list of options.
 GlobalActorReference getTransformer()
          Returns the global transformer in use.
protected  void preQuery()
          Hook method before querying the webservice.
 void setTransformer(GlobalActorReference value)
          Sets the global transformer to use.
 String transformerTipText()
          Returns the tip text for this property.
 
Methods inherited from class adams.flow.webservice.AbstractWebServiceClientSource
cleanUp, doQuery, getOwner, getWsdlLocation, postQuery, query, setOwner
 
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, debug, debug, debugLevelTipText, destroy, finishInit, getDebugLevel, getOptionManager, globalInfo, initialize, isDebugOn, newOptionManager, reset, setDebugLevel, toCommandLine, toString
 
Methods inherited from class adams.core.ConsoleObject
getDebugging, getSystemErr, getSystemOut, sizeOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface adams.flow.webservice.WebServiceClientProducer
generates, getResponseData, hasResponseData
 

Field Detail

m_Transformer

protected GlobalActorReference m_Transformer
the global transformer.


m_ActualTransformer

protected AbstractActor m_ActualTransformer
the actual transformer to use.

Constructor Detail

AbstractWebServiceClientSourceWithGlobalTransformer

public AbstractWebServiceClientSourceWithGlobalTransformer()
Method Detail

defineOptions

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

Specified by:
defineOptions in interface OptionHandler
Overrides:
defineOptions in class AbstractOptionHandler

setTransformer

public void setTransformer(GlobalActorReference value)
Sets the global transformer to use.

Specified by:
setTransformer in interface GlobalTransformerSupport<O,O>
Parameters:
value - the reference

getTransformer

public GlobalActorReference getTransformer()
Returns the global transformer in use.

Specified by:
getTransformer in interface GlobalTransformerSupport<O,O>
Returns:
the reference

transformerTipText

public String transformerTipText()
Returns the tip text for this property.

Specified by:
transformerTipText in interface GlobalTransformerSupport<O,O>
Returns:
tip text for this property suitable for displaying in the GUI or for listing the options.

preQuery

protected void preQuery()
                 throws Exception
Hook method before querying the webservice.

Tries to obtain and initialize the global transformer.

Overrides:
preQuery in class AbstractWebServiceClientSource<O>
Throws:
Exception - if it fails for some reason

applyTransformer

public O applyTransformer(O data)
                   throws Exception
Applies the transformer to the data.

Specified by:
applyTransformer in interface GlobalTransformerSupport<O,O>
Parameters:
data - the data to process
Returns:
the processed data
Throws:
Exception - if it fails for some reason


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