net.sourceforge.taverna.io
Class AbstractStreamTransmitter

java.lang.Object
  extended by net.sourceforge.taverna.io.AbstractStreamTransmitter
All Implemented Interfaces:
StreamTransmitter
Direct Known Subclasses:
GetStreamTransmitter, PostStreamTransmitter

public abstract class AbstractStreamTransmitter
extends java.lang.Object
implements StreamTransmitter

This class provides the base class for all Stream-based transmitters. These transmitters transmit an object or a reflector containing a set of parameters to an endpoint (such as a servlet or JSP page) and process the result stream using a StreamProcessor. Last edited by $Author: sowen70 $

Version:
$Revision: 1.3 $
Author:
Mark

Constructor Summary
AbstractStreamTransmitter()
           
 
Method Summary
 void setAuthentication(java.lang.String userName, java.lang.String password)
          This method sets the userName and password used to transmit data to the service.
 void setContext(java.lang.String context)
          This method sets the context for the url.
 void setHost(java.lang.String host)
          This method sets the host for the url.
 void setMimeHeader(java.lang.String name, java.lang.String value)
          This method sets the mime-header.
 void setPort(int port)
          This method sets the port for the url.
 void setServiceName(java.lang.String serviceName)
          This method is used to set the service URL.
 void setURL(java.lang.String urlStr)
          This method sets the URL.
abstract  java.util.Map transmit(java.util.Map map, StreamProcessor streamProcessor)
          This method takes a reflectable object and transmits it to a service
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractStreamTransmitter

public AbstractStreamTransmitter()
Method Detail

transmit

public abstract java.util.Map transmit(java.util.Map map,
                                       StreamProcessor streamProcessor)
                                throws TransmitterException
Description copied from interface: StreamTransmitter
This method takes a reflectable object and transmits it to a service

Specified by:
transmit in interface StreamTransmitter
Parameters:
map - A map object (either HashTable or HashMap) containing the parameter names(keys) and parameter values to be transmitted.
Throws:
TransmitterException
See Also:
com.kymerix.reflector.StreamTransmitter#transmit(java.util.HashMap, com.kymerix.reflector.StreamProcessor)

setServiceName

public void setServiceName(java.lang.String serviceName)
Description copied from interface: StreamTransmitter
This method is used to set the service URL.

Specified by:
setServiceName in interface StreamTransmitter
Parameters:
serviceName - The name of the service for the url.
See Also:
com.kymerix.reflector.StreamTransmitter#setServiceName(java.lang.String)

setHost

public void setHost(java.lang.String host)
Description copied from interface: StreamTransmitter
This method sets the host for the url.

Specified by:
setHost in interface StreamTransmitter
See Also:
com.kymerix.reflector.StreamTransmitter#setHost(java.lang.String)

setPort

public void setPort(int port)
Description copied from interface: StreamTransmitter
This method sets the port for the url.

Specified by:
setPort in interface StreamTransmitter
Parameters:
port - The port used by the service.
See Also:
com.kymerix.reflector.StreamTransmitter#setPort(int)

setContext

public void setContext(java.lang.String context)
Description copied from interface: StreamTransmitter
This method sets the context for the url.

Specified by:
setContext in interface StreamTransmitter
Parameters:
context - The following portion of the url: http://host:port/context
See Also:
com.kymerix.reflector.StreamTransmitter#setContext(java.lang.String)

setAuthentication

public void setAuthentication(java.lang.String userName,
                              java.lang.String password)
Description copied from interface: StreamTransmitter
This method sets the userName and password used to transmit data to the service.

Specified by:
setAuthentication in interface StreamTransmitter
Parameters:
userName - The username used for authentication.
password - The password used for authentication.
See Also:
com.kymerix.reflector.StreamTransmitter#setAuthentication(java.lang.String, java.lang.String)

setMimeHeader

public void setMimeHeader(java.lang.String name,
                          java.lang.String value)
Description copied from interface: StreamTransmitter
This method sets the mime-header.

Specified by:
setMimeHeader in interface StreamTransmitter
Parameters:
name - Name of the header parameter.
value - The value of the header parameter.
See Also:
com.kymerix.reflector.StreamTransmitter#setMimeHeader(java.lang.String, java.lang.String)

setURL

public void setURL(java.lang.String urlStr)
            throws java.net.MalformedURLException
Description copied from interface: StreamTransmitter
This method sets the URL.

Specified by:
setURL in interface StreamTransmitter
Throws:
java.net.MalformedURLException