adams.flow.webservice
Class AbstractWebServiceClientSink<I>

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

public abstract class AbstractWebServiceClientSink<I>
extends AbstractOptionHandler
implements WebServiceClientConsumer<I>

Ancestor for webservice clients.

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

Field Summary
protected  AbstractActor m_Owner
          the owner.
 
Fields inherited from class adams.core.option.AbstractOptionHandler
m_DebugLevel, m_OptionManager
 
Constructor Summary
AbstractWebServiceClientSink()
           
 
Method Summary
 void cleanUp()
          Cleans up the client.
protected abstract  void doQuery()
          Performs the actual webservice query.
 AbstractActor getOwner()
          Returns the owning actor.
protected abstract  URL getWsdlLocation()
          Returns the WSDL location.
protected  void postQuery()
          Hook method after querying the webservice.
protected  void preQuery()
          Hook method before querying the webservice.
 void query()
          Queries the webservice.
 void setOwner(AbstractActor value)
          Sets the actor that executes this webservice.
 
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, debug, debug, debugLevelTipText, defineOptions, 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_Owner

protected AbstractActor m_Owner
the owner.

Constructor Detail

AbstractWebServiceClientSink

public AbstractWebServiceClientSink()
Method Detail

setOwner

public void setOwner(AbstractActor value)
Sets the actor that executes this webservice.

Specified by:
setOwner in interface WebServiceClient
Parameters:
value - the owner

getOwner

public AbstractActor getOwner()
Returns the owning actor.

Specified by:
getOwner in interface WebServiceClient
Returns:
the owner

getWsdlLocation

protected abstract URL getWsdlLocation()
Returns the WSDL location.

Returns:
the location

preQuery

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

Default implementation ensures that an owner is set.

Throws:
Exception - if it fails for some reason

doQuery

protected abstract void doQuery()
                         throws Exception
Performs the actual webservice query.

Throws:
Exception - if accessing webservice fails for some reason

postQuery

protected void postQuery()
                  throws Exception
Hook method after querying the webservice.

Default implementation does nothing.

Throws:
Exception - if it fails for some reason

query

public void query()
           throws Exception
Queries the webservice.

Specified by:
query in interface WebServiceClient
Throws:
Exception - if accessing webservice fails for some reason

cleanUp

public void cleanUp()
Cleans up the client.

Specified by:
cleanUp in interface CleanUpHandler


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