SonicMQ API

progress.message.jclient.channel
Interface RecoverableFileChannel

All Superinterfaces:
Channel

public interface RecoverableFileChannel
extends Channel

This is an implementation of Channel that is used to transfer a file between clients.

See Also:
Channel

Field Summary
static int RFC_CANCELLED
          The File transfer has been cancelled.
static int RFC_CLOSED
          The File transfer has been closed.
static int RFC_DISCONNECT
          The broker QueueConnection being used to transfer the file has disconnected.
static int RFC_LOCAL_ERROR
          There has been an error at the local client during the transfer.
static int RFC_PRE_CONNECT_ATTEMPT
          The File channel has been restored, but continueTransfer() has not yet been called.
static int RFC_REMOTE_ERROR
          There has been an error at the remote client during the transfer.
static int RFC_RETRY_TIMEOUT
          The File transfer is currently timed out.
static int RFC_TRANSFER_COMPLETE
          The File transfer has completed.
static int RFC_TRANSFERRING
          The File is currently transferring.
static int RFC_WAITING_CONNECT
          The File transfer is waiting for a connect with the remote client.
 
Method Summary
 void cancel()
          Cancel the channel.
 boolean isSaving()
          Return whether or not this Recoverable file channel is actively saving information to a file.
 void save(java.io.File file)
          Save the file associated with this channel to the given File reference.
 void setBlockSize(int size)
          Sets the block size Upon receipt of a file, information is read from the network into an internal buffer, then onto disk.
 void setDES(java.security.Key key)
          Set the RecoverableFileChannel as DES secure.
 void setDESede(java.security.Key key)
          Set the RecoverableFileChannel as Triple DES secure.
 
Methods inherited from interface progress.message.jclient.Channel
close, completeConnect, completeTransfer, continueTransfer, getChannelID, getChannelStatus, getFragmentSize, getRetryCount, getRetryInterval, getTimeout, getWindowSize, setChannelListener, setFragmentSize, setRetryCount, setRetryInterval, setTimeout, setUUID, setWindowSize
 

Field Detail

RFC_TRANSFERRING

static final int RFC_TRANSFERRING
The File is currently transferring.

The value of RFC_TRANSFERRING is equal to 0

See Also:
Constant Field Values

RFC_TRANSFER_COMPLETE

static final int RFC_TRANSFER_COMPLETE
The File transfer has completed.

The value of RFC_TRANSFER_COMPLETE is equal to 1

See Also:
Constant Field Values

RFC_CANCELLED

static final int RFC_CANCELLED
The File transfer has been cancelled.

The value of RFC_CANCELLED is equal to 2

See Also:
Constant Field Values

RFC_CLOSED

static final int RFC_CLOSED
The File transfer has been closed.

The value of RFC_CLOSED is equal to 3

See Also:
Constant Field Values

RFC_WAITING_CONNECT

static final int RFC_WAITING_CONNECT
The File transfer is waiting for a connect with the remote client.

The value of RFC_WAITING_CONNECT is equal to 4

See Also:
Constant Field Values

RFC_RETRY_TIMEOUT

static final int RFC_RETRY_TIMEOUT
The File transfer is currently timed out.

The value of RFC_RETRY_TIMEOUT is equal to 5

See Also:
Constant Field Values

RFC_PRE_CONNECT_ATTEMPT

static final int RFC_PRE_CONNECT_ATTEMPT
The File channel has been restored, but continueTransfer() has not yet been called.

The value of RFC_PRE_CONNECT_ATTEMPT is equal to 6

See Also:
Constant Field Values

RFC_DISCONNECT

static final int RFC_DISCONNECT
The broker QueueConnection being used to transfer the file has disconnected.

The value of RFC_DISCONNECT is equal to 7

See Also:
Constant Field Values

RFC_REMOTE_ERROR

static final int RFC_REMOTE_ERROR
There has been an error at the remote client during the transfer.

The value of RFC_REMOTE_ERROR is equal to 8

See Also:
Constant Field Values

RFC_LOCAL_ERROR

static final int RFC_LOCAL_ERROR
There has been an error at the local client during the transfer.

The value of RFC_LOCAL_ERROR is equal to 9

See Also:
Constant Field Values
Method Detail

save

void save(java.io.File file)
          throws JMSException,
                 java.io.IOException
Save the file associated with this channel to the given File reference.

Parameters:
file - The file to save the information too.
Throws:
JMSException - If there is an internal JMS Error
java.io.IOException - If there are internal File I/O problems.

isSaving

boolean isSaving()
                 throws JMSException
Return whether or not this Recoverable file channel is actively saving information to a file.

Returns:
True if this channel is actively saving information to a file. False if not.
Throws:
JMSException - If there is an internal JMS Error.

cancel

void cancel()
            throws JMSException
Cancel the channel.

Closes the channel and removes any recovery information.

Throws:
JMSException

setBlockSize

void setBlockSize(int size)
                  throws JMSException
Sets the block size

Upon receipt of a file, information is read from the network into an internal buffer, then onto disk. The bigger the buffer, the larger the chunks written to disk, the more information that may need to be resent in case of failure.

Parameters:
size - The size, in bytes, of the buffer.
Throws:
JMSException - If there is an internal JMS Exception.

setDES

void setDES(java.security.Key key)
            throws JMSException
Set the RecoverableFileChannel as DES secure.

This command will cause the RecoverableFileChannel to read a file as if it has been DES encrypted, and write the file as DES encrypted.

Parameters:
key - The key to encrypt/decrypt with.
Throws:
JMSException - If there is an internal JMS exception.

setDESede

void setDESede(java.security.Key key)
               throws JMSException
Set the RecoverableFileChannel as Triple DES secure.

This command will cause the RecoverableFileChannel to read a file as if it has been Triple DES encrypted, and write the file as Triple DES encrypted.

Parameters:
key - The key to encrypt/decrypt with.
Throws:
JMSException - If there is an internal JMS exception.

SonicMQ API

Copyright © 1999-2010 Progress Software Corporation. All Rights Reserved.
HTML formatted on 15-September-2010.