uk.org.ogsadai.client.toolkit.activity.delivery
Class DataTransportMode

java.lang.Object
  |
  +--uk.org.ogsadai.client.toolkit.activity.delivery.DataTransportMode

public final class DataTransportMode
extends java.lang.Object

A DataTransport transfer mode - full transfer or block by block transfer.

Author:
The OGSA-DAI Project Team

Field Summary
static DataTransportMode BLOCK
          Transfer data block by block.
static DataTransportMode FULL
          Transfer data in full within a single block.
 
Method Summary
 java.lang.String getAsString()
          Return the transfer mode as a string - either "block" or "full".
 boolean isBlock()
          Is the current transfer mode a block by block transfer?
 boolean isFull()
          Is the current transfer mode a full transfer?
 void setBlock()
          Set the transfer mode to be a block by block transfer
 void setFull()
          Set the transfer mode to be a full transfer
 void setMode(java.lang.String mode)
          Set the transfer mode.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BLOCK

public static final DataTransportMode BLOCK
Transfer data block by block.


FULL

public static final DataTransportMode FULL
Transfer data in full within a single block.

Method Detail

setMode

public void setMode(java.lang.String mode)
Set the transfer mode.

Parameters:
mode - with value DataTransportMode.BLOCK_STRING for a block by block transfer or DataTransportMode.FULL_STRING for a full transfer.
Throws:
java.lang.IllegalArgumentException - If mode is neither DataTransportMode.BLOCK_STRING or DataTransportMode.FULL_STRING

setFull

public void setFull()
Set the transfer mode to be a full transfer


setBlock

public void setBlock()
Set the transfer mode to be a block by block transfer


isBlock

public boolean isBlock()
Is the current transfer mode a block by block transfer?

Returns:
true if mode is BLOCK_STRING.

isFull

public boolean isFull()
Is the current transfer mode a full transfer?

Returns:
true if mode is FULL_STRING.

getAsString

public java.lang.String getAsString()
Return the transfer mode as a string - either "block" or "full".

Returns:
String