com.softwareag.tamino.db.api.invocation.wsl
Class TWSLInvocationRequestWriter

java.lang.Object
  extended by com.softwareag.tamino.db.api.invocation.TInvocationRequestWriter
      extended by com.softwareag.tamino.db.api.invocation.wsl.TWSLInvocationRequestWriter

public class TWSLInvocationRequestWriter
extends TInvocationRequestWriter

TWSLInvocationRequestWriter constructs a multipart/form-data documents which will be transmitted to Tamino via a POST request.

Version:
$Revision: 1.6 $
Author:
Gerald Ristow

Nested Class Summary
 
Nested classes/interfaces inherited from class com.softwareag.tamino.db.api.invocation.TInvocationRequestWriter
TInvocationRequestWriter.TCommandItemPairWriter
 
Constructor Summary
TWSLInvocationRequestWriter()
          Creates new TWSLInvocationRequestWriter
 
Method Summary
protected  void close()
          Closes the invocation request.
protected  boolean isClosed()
          Indicates if request writer is currently closed meaning that it is not possible to write any command statements into a Tamino request.
 void setConnection(WSL wsl)
          Sets a new WSL connection so that a new invocation request can be written.
protected  void write(java.lang.String key, java.lang.String value)
          Writes the given key/value pair into the invocation request.
protected  void write(java.lang.String key, TStreamable value)
          Writes the given key/value pair into the invocation request.
 
Methods inherited from class com.softwareag.tamino.db.api.invocation.TInvocationRequestWriter
getLocale, setLocale, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TWSLInvocationRequestWriter

public TWSLInvocationRequestWriter()
Creates new TWSLInvocationRequestWriter

Method Detail

setConnection

public void setConnection(WSL wsl)
                   throws TInvocationRequestNotWritableException
Sets a new WSL connection so that a new invocation request can be written.

Parameters:
wsl - to be initialized for communication.
Throws:
TInvocationRequestNotWritableException - if any problems during writing occur.

write

protected void write(java.lang.String key,
                     java.lang.String value)
              throws TInvocationRequestNotWritableException
Writes the given key/value pair into the invocation request. Serves as a plug in method for this class.

Specified by:
write in class TInvocationRequestWriter
Parameters:
key - that identifies a Tamino specific command key (e.g. _process).
value - is referred to the key and might be the content for a Tamino specific command.
Throws:
TInvocationRequestNotWritableException - if any problems during writing occur.

write

protected void write(java.lang.String key,
                     TStreamable value)
              throws TInvocationRequestNotWritableException
Writes the given key/value pair into the invocation request. Serves as a plug in method for this class.

Specified by:
write in class TInvocationRequestWriter
Parameters:
key - that identifies a Tamino specific command key (e.g. _process).
value - is referred to the key and might be the content for a Tamino specific command. The value is here given as a TStreamable instance.
Throws:
TInvocationRequestNotWritableException - if any problems during writing occur.

close

protected void close()
              throws TInvocationRequestNotWritableException
Closes the invocation request. The data that has been written to an underlying output stream is flushed here. Serves as a plug in method for this class.

Specified by:
close in class TInvocationRequestWriter
Throws:
TInvocationRequestNotWritableException - if any problems during writing occur.

isClosed

protected boolean isClosed()
Indicates if request writer is currently closed meaning that it is not possible to write any command statements into a Tamino request. Whether a closed invocation request writer can be reopenned depends on the concrete implementation. Please note that an invocation request writer is normally closed once a command statement has been written to the request. This might however depend on the concrete implementation.

Specified by:
isClosed in class TInvocationRequestWriter
Returns:
true if invocation writer has been closed, true otherwise.


Copyright (c) 2013 Software AG. All Rights Reserved.