cgl.narada.transport.udp
Class UDPPackageCombine

java.lang.Object
  extended by java.lang.Thread
      extended by cgl.narada.transport.udp.UDPPackageCombine
All Implemented Interfaces:
Runnable

public class UDPPackageCombine
extends Thread

Title: UDPPackageCombine

Description: Helps to combine small packages which are the part of a bigger package

Version:
1.0

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
UDPPackageCombine(boolean db)
          Constructor
 
Method Summary
 Hashtable getHT()
           
 Hashtable getSizeHT()
           
static void main(String[] args)
           
 byte[] recombinePack(long pnumber, int wholepacksize, int offset, byte[] comingpackage)
          combines small packages which is part of bigger package
 void run()
          This suns a thread which drops a packages if they are not complited in a given time
 void shutdownServices()
           
 
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

UDPPackageCombine

public UDPPackageCombine(boolean db)
Constructor

Method Detail

getHT

public Hashtable getHT()

getSizeHT

public Hashtable getSizeHT()

shutdownServices

public void shutdownServices()

recombinePack

public byte[] recombinePack(long pnumber,
                            int wholepacksize,
                            int offset,
                            byte[] comingpackage)
combines small packages which is part of bigger package

Parameters:
pnumber - unique number of big package
wholepacksize - the whole size of big package
offset - offset of small package in the big package
comingpackage - the bytes of recevied small package
Returns:
combined package

run

public void run()
This suns a thread which drops a packages if they are not complited in a given time

Specified by:
run in interface Runnable
Overrides:
run in class Thread

main

public static void main(String[] args)


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