public class ServerActions extends ConnectionActions
Can be used in both standard mode (original packet), or in JSON mode.
globalDigest, localChannelReference, localDigest, session
Constructor and Description |
---|
ServerActions() |
Modifier and Type | Method and Description |
---|---|
long[] |
bandwidth(boolean setter,
long writeglobal,
long readglobal,
long writesession,
long readsession)
Get or Set the bandwidth configuration
|
void |
blockRequest(BlockRequestPacket packet)
Block/Unblock Request
|
R66Result |
blockRequest(byte[] key,
boolean isBlocking)
Block/Unblock Request
|
R66Future |
businessRequest(boolean isToApplied,
String className,
String arguments,
String extraArguments,
int delay)
Business Request (channel should stay open)
Note: the thread called should manage all writeback informations, as well
as status, channel closing if
needed or not.
|
void |
businessRequest(BusinessRequestPacket packet)
Business Request (channel should stay open)
Note: the thread called should manage all writeback informations, as well
as status, channel closing if
needed or not.
|
R66Result |
cancelTransfer(Transfer transfer) |
String[] |
configExport(boolean bhost,
boolean brule,
boolean bbusiness,
boolean balias,
boolean broles)
Export configuration and return filenames in order
|
ConfigImportResponseJsonPacket |
configImport(ConfigImportJsonPacket json)
Import configuration from files as parameter
|
void |
information(InformationPacket packet)
Receive a request of information
|
ValidPacket |
informationFile(byte request,
String rulename,
String filename,
boolean jsonOutput)
Receive a request of information (Transfer information or File listing)
|
ValidPacket |
informationRequest(long id,
boolean isTo,
String remoteHost,
boolean jsonOutput)
Receive a request of information (Transfer information or File listing)
|
boolean |
isCodeValid(ErrorCode code) |
void |
jsonCommand(JsonCommandPacket packet)
Receive a json request
|
String[] |
logPurge(boolean purge,
boolean clean,
Timestamp start,
Timestamp stop,
String startid,
String stopid,
String rule,
String request,
boolean pending,
boolean transfer,
boolean done,
boolean error,
boolean isPurge)
Purge the logs as required
|
R66Result |
requestRestart(String reqd,
String reqr,
long id,
Date date)
Request to restart a transfer
|
void |
shutdown(byte[] key,
boolean isRestart)
Receive a Shutdown request
|
void |
shutdown(ShutdownPacket packet)
Receive a Shutdown request
|
static String[] |
staticConfigExport(String dir,
boolean bhost,
boolean brule,
boolean bbusiness,
boolean balias,
boolean broles)
Export configuration and return filenames in order
|
R66Result |
stopOrCancel(byte type,
String reqd,
String reqr,
long id)
Stop or Cancel a transfer.
|
R66Result |
stopTransfer(Transfer transfer) |
void |
test(TestPacket packet)
Test reception
|
R66Result |
transferRequest(TransferRequestJsonPacket request)
Receive a TransferRequest in JSON mode: just setting it to be scheduled
|
void |
valid(ValidPacket packet)
Receive a validation or a special request
|
authent, channelClosed, connectionError, errorMesg, getLocalChannelReference, getSession, newSession, setLocalChannelReference, startup, tryFinalizeRequest
public void test(TestPacket packet) throws OpenR66ProtocolNotAuthenticatedException, OpenR66ProtocolPacketException
packet
- OpenR66ProtocolNotAuthenticatedException
OpenR66ProtocolPacketException
public void information(InformationPacket packet) throws OpenR66ProtocolNotAuthenticatedException, OpenR66ProtocolNoDataException, OpenR66ProtocolPacketException
packet
- CommandAbstractException
OpenR66ProtocolNotAuthenticatedException
OpenR66ProtocolNoDataException
OpenR66ProtocolPacketException
public void valid(ValidPacket packet) throws OpenR66ProtocolNotAuthenticatedException, OpenR66RunnerErrorException, OpenR66ProtocolSystemException, OpenR66ProtocolBusinessException
public void jsonCommand(JsonCommandPacket packet) throws OpenR66ProtocolNotAuthenticatedException, OpenR66RunnerErrorException, OpenR66ProtocolSystemException, OpenR66ProtocolBusinessException, OpenR66ProtocolShutdownException, OpenR66ProtocolPacketException, OpenR66ProtocolNoDataException
public final long[] bandwidth(boolean setter, long writeglobal, long readglobal, long writesession, long readsession) throws OpenR66ProtocolNotAuthenticatedException
setter
- writeglobal
- readglobal
- writesession
- readsession
- OpenR66ProtocolNotAuthenticatedException
public final ConfigImportResponseJsonPacket configImport(ConfigImportJsonPacket json) throws OpenR66ProtocolNotAuthenticatedException, OpenR66ProtocolSystemException
json
- OpenR66ProtocolNotAuthenticatedException
OpenR66ProtocolSystemException
public final String[] configExport(boolean bhost, boolean brule, boolean bbusiness, boolean balias, boolean broles) throws OpenR66ProtocolNotAuthenticatedException
bhost
- brule
- bbusiness
- balias
- broles
- OpenR66ProtocolNotAuthenticatedException
public static String[] staticConfigExport(String dir, boolean bhost, boolean brule, boolean bbusiness, boolean balias, boolean broles)
dir
- bhost
- brule
- bbusiness
- balias
- broles
- public final R66Result requestRestart(String reqd, String reqr, long id, Date date) throws OpenR66ProtocolNotAuthenticatedException
reqd
- requestedreqr
- requesterid
- id of the Transferdate
- time start if anyOpenR66ProtocolNotAuthenticatedException
public final boolean isCodeValid(ErrorCode code)
code
- public final String[] logPurge(boolean purge, boolean clean, Timestamp start, Timestamp stop, String startid, String stopid, String rule, String request, boolean pending, boolean transfer, boolean done, boolean error, boolean isPurge) throws OpenR66ProtocolNotAuthenticatedException, OpenR66ProtocolBusinessException
purge
- clean
- start
- stop
- startid
- stopid
- rule
- request
- pending
- transfer
- done
- error
- isPurge
- OpenR66ProtocolNotAuthenticatedException
OpenR66ProtocolBusinessException
public final R66Result stopOrCancel(byte type, String reqd, String reqr, long id) throws OpenR66ProtocolNotAuthenticatedException
type
- reqd
- reqr
- id
- OpenR66ProtocolNotAuthenticatedException
public R66Result stopTransfer(Transfer transfer)
transfer
- the transfer to stoppublic R66Result cancelTransfer(Transfer transfer)
transfer
- the transfer to stoppublic void shutdown(ShutdownPacket packet) throws OpenR66ProtocolShutdownException, OpenR66ProtocolNotAuthenticatedException, OpenR66ProtocolBusinessException
packet
- OpenR66ProtocolShutdownException
OpenR66ProtocolNotAuthenticatedException
OpenR66ProtocolBusinessException
public final void shutdown(byte[] key, boolean isRestart) throws OpenR66ProtocolShutdownException, OpenR66ProtocolNotAuthenticatedException, OpenR66ProtocolBusinessException
key
- isRestart
- OpenR66ProtocolShutdownException
OpenR66ProtocolNotAuthenticatedException
OpenR66ProtocolBusinessException
public void businessRequest(BusinessRequestPacket packet) throws OpenR66ProtocolNotAuthenticatedException, OpenR66ProtocolPacketException
Note: the thread called should manage all writeback informations, as well as status, channel closing if needed or not.
packet
- OpenR66ProtocolNotAuthenticatedException
OpenR66ProtocolPacketException
public final R66Future businessRequest(boolean isToApplied, String className, String arguments, String extraArguments, int delay) throws OpenR66ProtocolNotAuthenticatedException, OpenR66ProtocolPacketException
Note: the thread called should manage all writeback informations, as well as status, channel closing if needed or not.
isToApplied
- True means this is an action request, False it
is
the feedbackclassName
- arguments
- extraArguments
- delay
- OpenR66ProtocolNotAuthenticatedException
OpenR66ProtocolPacketException
public void blockRequest(BlockRequestPacket packet) throws OpenR66ProtocolPacketException, OpenR66ProtocolBusinessException
packet
- OpenR66ProtocolPacketException
OpenR66ProtocolBusinessException
public final R66Result blockRequest(byte[] key, boolean isBlocking) throws OpenR66ProtocolBusinessException
key
- isBlocking
- OpenR66ProtocolPacketException
OpenR66ProtocolBusinessException
public final ValidPacket informationFile(byte request, String rulename, String filename, boolean jsonOutput) throws OpenR66ProtocolNotAuthenticatedException, OpenR66ProtocolNoDataException, OpenR66ProtocolPacketException
request
- InformationPacket.ASKENUM ordinalrulename
- rulename for file pathfilename
- partial name (including wildcard)jsonOutput
- ValidPacket will contain Json format ?OpenR66ProtocolNotAuthenticatedException
OpenR66ProtocolNoDataException
OpenR66ProtocolPacketException
public final ValidPacket informationRequest(long id, boolean isTo, String remoteHost, boolean jsonOutput) throws OpenR66ProtocolNotAuthenticatedException, OpenR66ProtocolNoDataException, OpenR66ProtocolPacketException
id
- Id of requestisTo
- True for remote host is requester, False for
requested
(default)remoteHost
- requester/requested for transfer if jsonOutput
is
True, else (jsonOutput False)
remoteHost is from current Authenticated userjsonOutput
- ValidPacket will contain Json format ?OpenR66ProtocolNotAuthenticatedException
OpenR66ProtocolNoDataException
OpenR66ProtocolPacketException
public final R66Result transferRequest(TransferRequestJsonPacket request)
request
- Copyright © 2009–2020 Waarp. All rights reserved.