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,
JsonPacket json)
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
|
allowReusableAuthentication, authent, channelClosed, connectionError, errorMesg, getLocalChannelReference, getSession, hasReusableAuthentication, newSession, setLocalChannelReference, startup, tryFinalizeRequest, validateAuthenticationReuse
public final void test(TestPacket packet) throws OpenR66ProtocolNotAuthenticatedException, OpenR66ProtocolPacketException
packet
- OpenR66ProtocolNotAuthenticatedException
OpenR66ProtocolPacketException
public final void information(InformationPacket packet) throws OpenR66ProtocolNotAuthenticatedException, OpenR66ProtocolNoDataException, OpenR66ProtocolPacketException
packet
- CommandAbstractException
OpenR66ProtocolNotAuthenticatedException
OpenR66ProtocolNoDataException
OpenR66ProtocolPacketException
public final void valid(ValidPacket packet) throws OpenR66ProtocolNotAuthenticatedException, OpenR66RunnerErrorException, OpenR66ProtocolSystemException, OpenR66ProtocolBusinessException
public final void jsonCommand(JsonCommandPacket packet, JsonPacket json) throws OpenR66ProtocolNotAuthenticatedException, OpenR66RunnerErrorException, OpenR66ProtocolSystemException, OpenR66ProtocolBusinessException, OpenR66ProtocolShutdownException, OpenR66ProtocolPacketException, OpenR66ProtocolNoDataException
public final long[] bandwidth(boolean setter, long writeglobal, long readglobal, long writesession, long readsession) throws OpenR66ProtocolNotAuthenticatedException, OpenR66ProtocolNoCorrectAuthenticationException
setter
- writeglobal
- readglobal
- writesession
- readsession
- OpenR66ProtocolNotAuthenticatedException
OpenR66ProtocolNoCorrectAuthenticationException
public final ConfigImportResponseJsonPacket configImport(ConfigImportJsonPacket json) throws OpenR66ProtocolNotAuthenticatedException, OpenR66ProtocolNoCorrectAuthenticationException, OpenR66ProtocolSystemException
json
- OpenR66ProtocolNotAuthenticatedException
OpenR66ProtocolSystemException
OpenR66ProtocolNoCorrectAuthenticationException
public final String[] configExport(boolean bhost, boolean brule, boolean bbusiness, boolean balias, boolean broles) throws OpenR66ProtocolNotAuthenticatedException, OpenR66ProtocolNoCorrectAuthenticationException
bhost
- brule
- bbusiness
- balias
- broles
- OpenR66ProtocolNotAuthenticatedException
OpenR66ProtocolNoCorrectAuthenticationException
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, OpenR66ProtocolNoCorrectAuthenticationException
reqd
- requestedreqr
- requesterid
- id of the Transferdate
- time start if anyOpenR66ProtocolNotAuthenticatedException
OpenR66ProtocolNoCorrectAuthenticationException
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, OpenR66ProtocolNoCorrectAuthenticationException
type
- reqd
- reqr
- id
- OpenR66ProtocolNotAuthenticatedException
OpenR66ProtocolNoCorrectAuthenticationException
public final R66Result stopTransfer(Transfer transfer)
transfer
- the transfer to stoppublic final R66Result cancelTransfer(Transfer transfer)
transfer
- the transfer to stoppublic final 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 final void businessRequest(BusinessRequestPacket packet) throws OpenR66ProtocolNotAuthenticatedException, OpenR66ProtocolPacketException, OpenR66ProtocolNoCorrectAuthenticationException
Note: the thread called should manage all writeback informations, as well as status, channel closing if needed or not.
packet
- OpenR66ProtocolNotAuthenticatedException
OpenR66ProtocolPacketException
OpenR66ProtocolNoCorrectAuthenticationException
public final R66Future businessRequest(boolean isToApplied, String className, String arguments, String extraArguments, int delay) throws OpenR66ProtocolNotAuthenticatedException, OpenR66ProtocolNoCorrectAuthenticationException
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
OpenR66ProtocolNoCorrectAuthenticationException
public final void blockRequest(BlockRequestPacket packet) throws OpenR66ProtocolBusinessException
packet
- 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
request
- InformationPacket.ASKENUM ordinalrulename
- rulename for file pathfilename
- partial name (including wildcard)jsonOutput
- ValidPacket will contain Json format ?OpenR66ProtocolNotAuthenticatedException
OpenR66ProtocolNoDataException
public final ValidPacket informationRequest(long id, boolean isTo, String remoteHost, boolean jsonOutput) throws OpenR66ProtocolNotAuthenticatedException, OpenR66ProtocolNoDataException
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
public final R66Result transferRequest(TransferRequestJsonPacket request)
request
- Copyright © 2009–2022 Waarp. All rights reserved.