Class ScheduledFIXServer
- All Implemented Interfaces:
com.epam.fixengine.manager.ConfiguredSessionListener
- Direct Known Subclasses:
ScheduledSSLFIXServer
-
Field Summary
Fields inherited from class com.epam.fixengine.FIXServer
configuration, servers -
Constructor Summary
ConstructorsConstructorDescriptionCreate instance of server that allow connection by default after server start if it was not denied by schedule.ScheduledFIXServer(boolean allowNonScheduledSession) Create instance of server.ScheduledFIXServer(boolean allowNonScheduledSession, TimeZone timeZone) Create instance of server.ScheduledFIXServer(com.epam.fixengine.configuration.Configuration config) ScheduledFIXServer(com.epam.fixengine.configuration.Configuration config, boolean allowNonScheduledSession) ScheduledFIXServer(com.epam.fixengine.configuration.Configuration config, boolean allowNonScheduledSession, TimeZone timeZone) Create instance of server.ScheduledFIXServer(com.epam.fixengine.configuration.Configuration config, TimeZone timeZone) ScheduledFIXServer(TimeZone timeZone) -
Method Summary
Modifier and TypeMethodDescriptionvoidAllow all incoming connection by default.voidCancel scheduled tasks for allow/deny connection.voidCancel all scheduled tasks for specified session and allow default connection behaviour for it.voidDeny all incoming connection by default.protected voidprotected voidvoiddescheduleSession(SessionParameters params) protected voidprotected voidvoidscheduleAllowSessions(String cronExpr) Schedule time to allow all incoming connection by default.voidscheduleDenySessions(String cronExpr) Schedule time to deny all incoming connection by default.voidscheduleSession(SessionParameters params, String startCronExpr, String stopCronExpr) voidscheduleSessionStart(String cronExpr, SessionParameters params) Schedule the start of period when incoming connections for specified session are allowed.voidscheduleSessionStop(String cronExpr, SessionParameters params) Schedule the end of period when incoming connections for specified session are allowed.voidsetListener(FIXServerListener listener) Sets listener.voidsetServerSchedule(String allowCronExpr, String denyCronExpr) voidstartSession(SessionParameters params) Allow connection to specified session manually.voidstop()Stops the server.voidstopSession(SessionParameters params) Stop specified session and deny connection manually.Methods inherited from class com.epam.fixengine.FIXServer
addServer, addServerStatusListener, clearServers, closePort, createServer, deleteServer, getAcceptorStrategy, getConfigPath, getConfiguredServerSocketFactory, getNic, getOpenPorts, getPorts, getRegisterAcceptorSession, getServer, getTransportFactory, handleAutoClose, isStarted, onAddSession, onRemoveSession, openPort, openPort, openPort, openPort, registerAcceptorSession, registerConfiguredSessions, removeServerStatusListener, setConfigPath, setConnectionValidator, setIncomingConnectionExecutor, setLoginWaitTimeout, setNic, setPort, setPorts, setPorts, setServer, start, stopAndDeleteServer, unregisterAcceptorSession, validateBeforeRegistration
-
Constructor Details
-
ScheduledFIXServer
public ScheduledFIXServer()Create instance of server that allow connection by default after server start if it was not denied by schedule. -
ScheduledFIXServer
public ScheduledFIXServer(com.epam.fixengine.configuration.Configuration config) -
ScheduledFIXServer
-
ScheduledFIXServer
-
ScheduledFIXServer
public ScheduledFIXServer(boolean allowNonScheduledSession) Create instance of server.- Parameters:
allowNonScheduledSession- false means that allowed only scheduled connection after server start. All rest are denied by default.
-
ScheduledFIXServer
public ScheduledFIXServer(com.epam.fixengine.configuration.Configuration config, boolean allowNonScheduledSession) -
ScheduledFIXServer
Create instance of server.- Parameters:
allowNonScheduledSession- false means that allowed only scheduled connection after server start. All rest are denied by default.
-
ScheduledFIXServer
public ScheduledFIXServer(com.epam.fixengine.configuration.Configuration config, boolean allowNonScheduledSession, TimeZone timeZone) Create instance of server.- Parameters:
allowNonScheduledSession- false means that allowed only scheduled connection after server start. All rest are denied by default.
-
-
Method Details
-
setListener
Description copied from class:FIXServerSets listener.- Overrides:
setListenerin classFIXServer- Parameters:
listener- - user specified listener
-
scheduleSessionStart
Schedule the start of period when incoming connections for specified session are allowed.- Parameters:
cronExpr- CRON expressionparams- session details
-
descheduleSessionStart
-
startSession
Allow connection to specified session manually.- Parameters:
params- session details
-
scheduleSessionStop
Schedule the end of period when incoming connections for specified session are allowed.- Parameters:
cronExpr- CRON expressionparams- session details
-
stop
Description copied from class:FIXServerStops the server.- Overrides:
stopin classFIXServer- Throws:
IOException- if stop was unsuccessful
-
descheduleSessionStop
-
stopSession
Stop specified session and deny connection manually.- Parameters:
params- session details
-
scheduleSession
-
descheduleSession
-
cancelSessionSchedule
Cancel all scheduled tasks for specified session and allow default connection behaviour for it.- Parameters:
params- session details
-
scheduleAllowSessions
Schedule time to allow all incoming connection by default.Note: default policy not applied for sessions which were started/stoped via methods startSession()/stopSession() or were scheduled by methods scheduleSessionStart()/scheduleSessionStop().
- Parameters:
cronExpr- CRON expression
-
descheduleAllowSessions
protected void descheduleAllowSessions() -
setServerSchedule
-
scheduleDenySessions
Schedule time to deny all incoming connection by default. After specified time new connection will be rejected automatically and session will not be passed to instance of FIXServerListener.Note: default policy not applied for sessions which were started/stoped via methods startSession()/stopSession() or were scheduled by methods scheduleSessionStart()/scheduleSessionStop().
- Parameters:
cronExpr- CRON expression
-
descheduleDenySessions
protected void descheduleDenySessions() -
cancelServerSchedule
public void cancelServerSchedule()Cancel scheduled tasks for allow/deny connection. -
allowSessions
public void allowSessions()Allow all incoming connection by default.Note: default policy not applied for sessions which were started/stoped via methods startSession()/stopSession() or were scheduled by methods scheduleSessionStart()/scheduleSessionStop().
-
denySessions
public void denySessions()Deny all incoming connection by default.Note: default policy not applied for sessions which were started/stoped via methods startSession()/stopSession() or were scheduled by methods scheduleSessionStart()/scheduleSessionStop().
-