cgl.narada.gridapps.nbgridftp.publisher
Class Client2NBData

java.lang.Object
  extended by java.lang.Thread
      extended by cgl.narada.gridapps.nbgridftp.publisher.Client2NBData
All Implemented Interfaces:
Runnable

public class Client2NBData
extends Thread

This class is a "data channel" of GridFTP. In this class we will store actual data from client in to the local temporary file and then it will read data from local temporary file and send to the other end of data channel by using NaradaBrokering. Current version of GridFTP with NaradaBrokering makes GridFTP server connect to the GridFTP client. This means we are only using as GridFTP with following settings: client.setLocalPassive(); client.setActive();.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Client2NBData(cgl.narada.gridapps.nbgridftp.publisher.Client2NBControl control, String tempFile)
           
 
Method Summary
static void close()
           
 void delete()
           
 String getFileName()
           
 boolean isFinished()
          Check for data tranferring is finished or not.
 void run()
           
 void setFileName(String fileName)
           
 void setHostPort(String host, int port)
          Setting the host name and port number of oped client data channel.
 void write2Client(byte[] message, int length)
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Client2NBData

public Client2NBData(cgl.narada.gridapps.nbgridftp.publisher.Client2NBControl control,
                     String tempFile)
Method Detail

setHostPort

public void setHostPort(String host,
                        int port)
Setting the host name and port number of oped client data channel.


setFileName

public void setFileName(String fileName)

getFileName

public String getFileName()

isFinished

public boolean isFinished()
Check for data tranferring is finished or not. return: It will return false only during transfering data from local temporary file to NaradaBrokering. Otherwise it will retun true.


run

public void run()
Specified by:
run in interface Runnable
Overrides:
run in class Thread

write2Client

public void write2Client(byte[] message,
                         int length)

delete

public void delete()

close

public static void close()


For comments and suggestions please send e-mail to The NaradaBrokering Project