openr66.protocol.localhandler
Class RetrieveRunner
java.lang.Object
java.lang.Thread
openr66.protocol.localhandler.RetrieveRunner
- All Implemented Interfaces:
- Runnable
public class RetrieveRunner
- extends Thread
Retrieve transfer runner
- Author:
- Frederic Bregier
Method Summary |
void |
run()
|
void |
stopRunner()
Try to stop the runner |
static goldengate.common.file.DataBlock |
transformToDataBlock(byte[] data)
Utility method for send through mode |
static org.jboss.netty.channel.ChannelFuture |
writeWhenPossible(goldengate.common.file.DataBlock block,
LocalChannelReference localChannelReference)
Write the next block when the channel is ready to prevent OOM |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, clone, 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 |
running
protected AtomicBoolean running
RetrieveRunner
protected RetrieveRunner()
RetrieveRunner
public RetrieveRunner(R66Session session,
org.jboss.netty.channel.Channel channel)
- Parameters:
session
- channel
- local channel
stopRunner
public void stopRunner()
- Try to stop the runner
run
public void run()
- Specified by:
run
in interface Runnable
- Overrides:
run
in class Thread
writeWhenPossible
public static org.jboss.netty.channel.ChannelFuture writeWhenPossible(goldengate.common.file.DataBlock block,
LocalChannelReference localChannelReference)
throws OpenR66ProtocolPacketException,
OpenR66RunnerErrorException,
OpenR66ProtocolSystemException
- Write the next block when the channel is ready to prevent OOM
- Parameters:
block
- localChannelReference
-
- Returns:
- the ChannelFuture on the write operation
- Throws:
OpenR66ProtocolPacketException
OpenR66RunnerErrorException
OpenR66ProtocolSystemException
transformToDataBlock
public static goldengate.common.file.DataBlock transformToDataBlock(byte[] data)
- Utility method for send through mode
- Parameters:
data
- the data byte, if null it is the last block
- Returns:
- the DataBlock associated to the data
Copyright © 2009-2012 Frederic Bregier. All Rights Reserved.