
public class R66Session extends Object implements SessionInterface
| Constructor and Description |
|---|
R66Session()
Create the session
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addError() |
void |
clear()
Clean the session
|
R66Auth |
getAuth() |
int |
getBlockSize() |
R66BusinessInterface |
getBusinessObject() |
R66Dir |
getDir() |
HashMap<String,R66Dir> |
getDirsFromSession() |
boolean |
getExtendedProtocol() |
R66File |
getFile() |
FilesystemBasedFileParameterImpl |
getFileParameter() |
SocketAddress |
getLocalAddress() |
LocalChannelReference |
getLocalChannelReference() |
SocketAddress |
getRemoteAddress() |
R66Restart |
getRestart() |
DbTaskRunner |
getRunner() |
R66FiniteDualStates |
getState() |
String |
getUniqueExtension() |
boolean |
isAuthenticated() |
boolean |
isReady() |
void |
newState(R66FiniteDualStates desiredstate)
Propose a new State
|
void |
partialClear() |
void |
renameReceiverFile(String newFilename)
Rename the current receive file from the very beginning since the sender
has a post action that changes its
name
|
void |
setBadRunner(DbTaskRunner runner,
ErrorCode code)
To be used when a request comes with a bad code so it cannot be set
normally
|
void |
setBlockSize(int blocksize) |
void |
setBusinessObject(R66BusinessInterface businessObject) |
void |
setErrorState() |
void |
setFileAfterPreRunner(boolean createFile)
Set the File from the runner once PRE operation are done
|
void |
setFileBeforePreRunner()
Set the File from the runner before PRE operation are done
|
void |
setFinalizeTransfer(boolean status,
R66Result finalValue)
Finalize the transfer step by running the error or post operation
according
to the status.
|
void |
setLocalChannelReference(LocalChannelReference localChannelReference) |
void |
setNoSessionRunner(DbTaskRunner runner,
LocalChannelReference localChannelReference)
To be called in case of No Session not from a valid LocalChannelHandler
|
void |
setReady(boolean isReady) |
void |
setRunner(DbTaskRunner runner)
Set the runner, and setup the directory first.
|
void |
setStatus(int stat)
Debugging purpose (trace)
|
void |
startup(boolean checkNotExternal)
START from the PreTask if necessary, and prepare the file
|
String |
toString() |
void |
tryFinalizeRequest(R66Result errorValue)
Try to finalize the request if possible
|
public boolean getExtendedProtocol()
public R66BusinessInterface getBusinessObject()
public void setBusinessObject(R66BusinessInterface businessObject)
businessObject - the businessObject to setpublic void newState(R66FiniteDualStates desiredstate)
desiredstate - IllegalFiniteStateException - if the new status if not okpublic void setErrorState()
public R66FiniteDualStates getState()
public void setStatus(int stat)
stat - public void clear()
SessionInterfaceclear in interface SessionInterfacepublic void partialClear()
public R66Auth getAuth()
getAuth in interface SessionInterfacepublic int getBlockSize()
getBlockSize in interface SessionInterfacepublic void setBlockSize(int blocksize)
blocksize - the blocksize to setpublic R66Dir getDir()
getDir in interface SessionInterfacepublic FilesystemBasedFileParameterImpl getFileParameter()
getFileParameter in interface SessionInterfacepublic R66Restart getRestart()
getRestart in interface SessionInterfacepublic boolean isAuthenticated()
public boolean isReady()
public void setReady(boolean isReady)
isReady - the isReady for transfer to setpublic DbTaskRunner getRunner()
public void setLocalChannelReference(LocalChannelReference localChannelReference)
localChannelReference - the localChannelReference to setpublic SocketAddress getRemoteAddress()
public SocketAddress getLocalAddress()
public LocalChannelReference getLocalChannelReference()
public void setNoSessionRunner(DbTaskRunner runner, LocalChannelReference localChannelReference)
runner - localChannelReference - public void setFileBeforePreRunner()
throws OpenR66RunnerErrorException
OpenR66RunnerErrorExceptionpublic void setFileAfterPreRunner(boolean createFile)
throws OpenR66RunnerErrorException,
CommandAbstractException
createFile - When True, the file can be newly created if
needed.
If False, no new file will be
created, thus having an Exception.OpenR66RunnerErrorExceptionCommandAbstractException - only when new received created
file
cannot be createdpublic void setBadRunner(DbTaskRunner runner, ErrorCode code)
runner - code - public void setRunner(DbTaskRunner runner) throws OpenR66RunnerErrorException
This call should be followed by a startup() call.
runner - the runner to setOpenR66RunnerErrorExceptionpublic void startup(boolean checkNotExternal)
throws OpenR66RunnerErrorException
checkNotExternal - if True, the file as Sender should not be
external to current directoryOpenR66RunnerErrorExceptionpublic void renameReceiverFile(String newFilename) throws OpenR66RunnerErrorException
newFilename - OpenR66RunnerErrorExceptionpublic void setFinalizeTransfer(boolean status,
R66Result finalValue)
throws OpenR66RunnerErrorException,
OpenR66ProtocolSystemException
status - finalValue - OpenR66RunnerErrorExceptionOpenR66ProtocolSystemExceptionpublic void tryFinalizeRequest(R66Result errorValue) throws OpenR66RunnerErrorException, OpenR66ProtocolSystemException
errorValue - OpenR66RunnerErrorExceptionOpenR66ProtocolSystemExceptionpublic R66File getFile()
public boolean addError()
public String getUniqueExtension()
getUniqueExtension in interface SessionInterfaceCopyright © 2009–2020 Waarp. All rights reserved.