adams.flow.webservice
Class AbstractWebServiceClientSinkWithGlobalTransformer<I>

java.lang.Object
  extended by adams.core.ConsoleObject
      extended by adams.core.option.AbstractOptionHandler
          extended by adams.flow.webservice.AbstractWebServiceClientSink<I>
              extended by adams.flow.webservice.AbstractWebServiceClientSinkWithGlobalTransformer<I>
Type Parameters:
I - the type of input data to handle
All Implemented Interfaces:
CleanUpHandler, Debuggable, Destroyable, OptionHandler, SizeOfHandler, GlobalTransformerSupport<I,I>, WebServiceClient, WebServiceClientConsumer<I>, Serializable

public abstract class AbstractWebServiceClientSinkWithGlobalTransformer<I>
extends AbstractWebServiceClientSink<I>
implements GlobalTransformerSupport<I,I>

Ancestor for sinks that use a global transformer to further process the data.

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.AbstractWebServiceClientSink
m_Owner
 
Fields inherited from class adams.core.option.AbstractOptionHandler
m_DebugLevel, m_OptionManager
 
Constructor Summary
AbstractWebServiceClientSinkWithGlobalTransformer()
           
 
Method Summary
 I applyTransformer(I 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.AbstractWebServiceClientSink
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.WebServiceClientConsumer
accepts, setRequestData
 

Field Detail

m_Transformer

protected GlobalActorReference m_Transformer
the global transformer.


m_ActualTransformer

protected AbstractActor m_ActualTransformer
the actual transformer to use.

Constructor Detail

AbstractWebServiceClientSinkWithGlobalTransformer

public AbstractWebServiceClientSinkWithGlobalTransformer()
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<I,I>
Parameters:
value - the reference

getTransformer

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

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

transformerTipText

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

Specified by:
transformerTipText in interface GlobalTransformerSupport<I,I>
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 AbstractWebServiceClientSink<I>
Throws:
Exception - if it fails for some reason

applyTransformer

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

Specified by:
applyTransformer in interface GlobalTransformerSupport<I,I>
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.