com.intel.gpe.clients.api.fts.byteio
Interface RandomByteIOFileTransferClient

All Superinterfaces:
ByteIOFileTransferClient, FileTransferClient, ServiceClient, WSLTClient, WSRFClient, WSRPClient

public interface RandomByteIOFileTransferClient
extends ByteIOFileTransferClient

The file transfer client for Byte-IO file transfer operations.

Since:
0.8
Version:
$Id$
Author:
Alexander Lukichev

Field Summary
 
Fields inherited from interface com.intel.gpe.clients.api.FileTransferClient
BASELINE, GASS, GRIDFTP, RANDOMBYTEIO, SFTP, STREAMABLEBYTEIO, SWA
 
Method Summary
 void append(byte[] data)
          Append data to the end of the remote file.
 java.util.Calendar getAccessTime()
          Get the time of the file last access
 java.util.Calendar getCreateTime()
          Get the time of resource creation.
 java.util.Calendar getModificationTime()
          Get the time of the file last modification
 long getSize()
          Get the size of the file behind the transfer resource.
 java.util.List<java.lang.String> getTransferMechanisms()
          Get the list of supported Byte-IO transfer mechanisms.
 boolean isReadable()
          Get the read permissions of the file.
 boolean isWritable()
          Get the write permissions of the file.
 byte[] read(long startOffset, int bytesPerBlock, int numBlocks, long stride)
          Read data.
 void truncAppend(long startOffset, byte[] data)
          Truncates remote file and append data to the end of it.
 void write(long startOffset, int bytesPerBlock, long stride, byte[] data)
          Write data.
 
Methods inherited from interface com.intel.gpe.clients.api.FileTransferClient
getSource, getTarget
 
Methods inherited from interface com.intel.gpe.clients.api.WSLTClient
destroy, getCurrentTime, getTerminationTime, setTerminationTime
 
Methods inherited from interface com.intel.gpe.clients.api.WSRPClient
getMultipleResourceProperties, getResourceProperty, getResourcePropertyDocument, queryXPath10Properties
 

Method Detail

read

byte[] read(long startOffset,
            int bytesPerBlock,
            int numBlocks,
            long stride)
            throws java.lang.NumberFormatException,
                   GPEByteIOCustomException,
                   GPEByteIOReadNotPermittedException,
                   GPEByteIOUnsupportedTransferException,
                   GPEResourceUnknownException,
                   GPEMiddlewareRemoteException,
                   GPEMiddlewareServiceException,
                   GPESecurityException,
                   GPEByteIOUnsupportedClientTransferMechanismException,
                   GPEInvalidResourcePropertyQNameException,
                   GPEUnmarshallingException
Read data.

Parameters:
startOffset - the start offset in the remote file
bytesPerBlock - amount of bytes to read per one block
numBlocks - the number of blocks to read
stride - the interval between blocks
Returns:
the array of read blocks; the blocks are aligned consequently
Throws:
GPEByteIOUnsupportedClientTransferMechanismException
GPEUnmarshallingException
GPEInvalidResourcePropertyQNameException
java.lang.NumberFormatException
GPEByteIOCustomException
GPEByteIOReadNotPermittedException
GPEByteIOUnsupportedTransferException
GPEResourceUnknownException
GPEMiddlewareRemoteException
GPEMiddlewareServiceException
GPESecurityException

write

void write(long startOffset,
           int bytesPerBlock,
           long stride,
           byte[] data)
           throws java.lang.NumberFormatException,
                  java.lang.IllegalArgumentException,
                  GPEByteIOCustomException,
                  GPEByteIOWriteNotPermittedException,
                  GPEByteIOUnsupportedTransferException,
                  GPEResourceUnknownException,
                  GPEMiddlewareRemoteException,
                  GPEMiddlewareServiceException,
                  GPESecurityException,
                  GPEInvalidResourcePropertyQNameException,
                  GPEUnmarshallingException,
                  GPEByteIOUnsupportedClientTransferMechanismException
Write data.

Parameters:
startOffset - the start offset in the remote file
bytesPerBlock - amount of bytes to write per one block
stride - the interval between blocks
data - the data to write; the following equation MUST be satisfied: data.length = bytesPerBlock * (number_of_blocks)
Throws:
GPEUnmarshallingException
GPEInvalidResourcePropertyQNameException
GPEByteIOUnsupportedClientTransferMechanismException
java.lang.NumberFormatException
java.lang.IllegalArgumentException
GPEByteIOCustomException
GPEByteIOWriteNotPermittedException
GPEByteIOUnsupportedTransferException
GPEResourceUnknownException
GPEMiddlewareRemoteException
GPEMiddlewareServiceException
GPESecurityException

append

void append(byte[] data)
            throws GPEByteIOCustomException,
                   GPEByteIOWriteNotPermittedException,
                   GPEByteIOUnsupportedTransferException,
                   GPEResourceUnknownException,
                   GPEMiddlewareRemoteException,
                   GPEMiddlewareServiceException,
                   GPESecurityException,
                   GPEInvalidResourcePropertyQNameException,
                   GPEUnmarshallingException,
                   GPEByteIOUnsupportedClientTransferMechanismException
Append data to the end of the remote file.

Parameters:
data - the data to append
Throws:
GPEUnmarshallingException
GPEInvalidResourcePropertyQNameException
GPEByteIOUnsupportedClientTransferMechanismException
GPEByteIOCustomException
GPEByteIOWriteNotPermittedException
GPEByteIOUnsupportedTransferException
GPEResourceUnknownException
GPEMiddlewareRemoteException
GPEMiddlewareServiceException
GPESecurityException

truncAppend

void truncAppend(long startOffset,
                 byte[] data)
                 throws GPEByteIOCustomException,
                        GPEByteIOWriteNotPermittedException,
                        GPEByteIOTruncateNotPermittedException,
                        GPEByteIOUnsupportedTransferException,
                        GPEResourceUnknownException,
                        GPEMiddlewareRemoteException,
                        GPEMiddlewareServiceException,
                        GPESecurityException,
                        GPEInvalidResourcePropertyQNameException,
                        GPEUnmarshallingException,
                        GPEByteIOUnsupportedClientTransferMechanismException
Truncates remote file and append data to the end of it.

Parameters:
data - the data to append
startOffset - the size to which this file must be truncated
Throws:
GPEUnmarshallingException
GPEInvalidResourcePropertyQNameException
GPEByteIOUnsupportedClientTransferMechanismException
GPEByteIOCustomException
GPEByteIOWriteNotPermittedException
GPEByteIOTruncateNotPermittedException
GPEByteIOUnsupportedTransferException
GPEResourceUnknownException
GPEMiddlewareRemoteException
GPEMiddlewareServiceException
GPESecurityException

getSize

long getSize()
             throws GPEInvalidResourcePropertyQNameException,
                    GPEResourceUnknownException,
                    GPEUnmarshallingException,
                    GPESecurityException,
                    GPEMiddlewareRemoteException,
                    GPEMiddlewareServiceException
Get the size of the file behind the transfer resource.

Returns:
the size of the file (in bytes)
Throws:
GPEInvalidResourcePropertyQNameException
GPEResourceUnknownException
GPEUnmarshallingException
GPESecurityException
GPEMiddlewareRemoteException
GPEMiddlewareServiceException

isReadable

boolean isReadable()
                   throws GPEInvalidResourcePropertyQNameException,
                          GPEResourceUnknownException,
                          GPEUnmarshallingException,
                          GPESecurityException,
                          GPEMiddlewareRemoteException,
                          GPEMiddlewareServiceException
Get the read permissions of the file.

Returns:
true if the file is readable by the resource creator
Throws:
GPEInvalidResourcePropertyQNameException
GPEResourceUnknownException
GPEUnmarshallingException
GPESecurityException
GPEMiddlewareRemoteException
GPEMiddlewareServiceException

isWritable

boolean isWritable()
                   throws GPEInvalidResourcePropertyQNameException,
                          GPEResourceUnknownException,
                          GPEUnmarshallingException,
                          GPESecurityException,
                          GPEMiddlewareRemoteException,
                          GPEMiddlewareServiceException
Get the write permissions of the file.

Returns:
true if the file is writable by the resource creator
Throws:
GPEInvalidResourcePropertyQNameException
GPEResourceUnknownException
GPEUnmarshallingException
GPESecurityException
GPEMiddlewareRemoteException
GPEMiddlewareServiceException

getTransferMechanisms

java.util.List<java.lang.String> getTransferMechanisms()
                                                       throws GPEInvalidResourcePropertyQNameException,
                                                              GPEResourceUnknownException,
                                                              GPEUnmarshallingException,
                                                              GPESecurityException,
                                                              GPEMiddlewareRemoteException,
                                                              GPEMiddlewareServiceException
Get the list of supported Byte-IO transfer mechanisms.

Returns:
the list of supported Byte-IO transfer mechanisms
Throws:
GPEInvalidResourcePropertyQNameException
GPEResourceUnknownException
GPEUnmarshallingException
GPESecurityException
GPEMiddlewareRemoteException
GPEMiddlewareServiceException

getCreateTime

java.util.Calendar getCreateTime()
                                 throws GPEInvalidResourcePropertyQNameException,
                                        GPEResourceUnknownException,
                                        GPEUnmarshallingException,
                                        GPESecurityException,
                                        GPEMiddlewareRemoteException,
                                        GPEMiddlewareServiceException
Get the time of resource creation.

Returns:
the time of resource creation
Throws:
GPEInvalidResourcePropertyQNameException
GPEResourceUnknownException
GPEUnmarshallingException
GPESecurityException
GPEMiddlewareRemoteException
GPEMiddlewareServiceException

getModificationTime

java.util.Calendar getModificationTime()
                                       throws GPEInvalidResourcePropertyQNameException,
                                              GPEResourceUnknownException,
                                              GPEUnmarshallingException,
                                              GPESecurityException,
                                              GPEMiddlewareRemoteException,
                                              GPEMiddlewareServiceException
Get the time of the file last modification

Returns:
the time of the file last modification
Throws:
GPEInvalidResourcePropertyQNameException
GPEResourceUnknownException
GPEUnmarshallingException
GPESecurityException
GPEMiddlewareRemoteException
GPEMiddlewareServiceException

getAccessTime

java.util.Calendar getAccessTime()
                                 throws GPEInvalidResourcePropertyQNameException,
                                        GPEResourceUnknownException,
                                        GPEUnmarshallingException,
                                        GPESecurityException,
                                        GPEMiddlewareRemoteException,
                                        GPEMiddlewareServiceException
Get the time of the file last access

Returns:
the time of the last file access
Throws:
GPEInvalidResourcePropertyQNameException
GPEResourceUnknownException
GPEUnmarshallingException
GPESecurityException
GPEMiddlewareRemoteException
GPEMiddlewareServiceException


Copyright © 2008. All Rights Reserved.