com.epam.fixengine.scheduler
Class ScheduledFIXServer

java.lang.Object
  extended by com.epam.fixengine.FIXServer
      extended by com.epam.fixengine.scheduler.ScheduledFIXServer

public class ScheduledFIXServer
extends FIXServer

FIXServer implementation that support scheduling of allow/deny policies for incoming connections.


Field Summary
 
Fields inherited from class com.epam.fixengine.FIXServer
configuration, configuredSessionRegister, ports, servers
 
Constructor Summary
ScheduledFIXServer()
          Create 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.
 
Method Summary
 void allowSessions()
          Allow all incoming connection by default.
 void cancelServerSchedule()
          Cancel scheduled tasks for allow/deny connection.
 void cancelSessionSchedule(SessionParameters params)
          Cancel all scheduled tasks for specified session and allow default connection behaviour for it.
 void denySessions()
          Deny all incoming connection by default.
protected  void descheduleAllowSessions()
           
protected  void descheduleDenySessions()
           
protected  void descheduleSessionStart(SessionParameters params)
           
protected  void descheduleSessionStop(SessionParameters params)
           
 void scheduleAllowSessions(String cronExpr)
          Schedule time to allow all incoming connection by default.
 void scheduleDenySessions(String cronExpr)
          Schedule time to deny all incoming connection by default.
 void scheduleSessionStart(String cronExpr, SessionParameters params)
          Schedule the start of period when incoming connections for specified session are allowed.
 void scheduleSessionStop(String cronExpr, SessionParameters params)
          Schedule the end of period when incoming connections for specified session are allowed.
 void setListener(FIXServerListener listener)
          Sets listener.
 void startSession(SessionParameters params)
          Allow connection to specified session manually.
 void stopSession(SessionParameters params)
          Stop specified session and deny connection manually.
 
Methods inherited from class com.epam.fixengine.FIXServer
getAcceptorStrategy, getConfigPath, getRegisterAcceptorSession, getTransportFactory, registerAcceptorSession, registerConfiguredSessions, setConfigPath, setLoginWaitTimeout, setNic, setPort, setPorts, setServer, start, stop, unregisterAcceptorSession
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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(boolean allowNonScheduledSession)
Create instance of server.

Parameters:
allowNonScheduledSession - false means that allowed only scheduled connection after server start. All rest are denied by default.
Method Detail

setListener

public void setListener(FIXServerListener listener)
Description copied from class: FIXServer
Sets listener.

Overrides:
setListener in class FIXServer
Parameters:
listener - - user specified listener

scheduleSessionStart

public void scheduleSessionStart(String cronExpr,
                                 SessionParameters params)
Schedule the start of period when incoming connections for specified session are allowed.

Parameters:
cronExpr - CRON expression
params - session details

descheduleSessionStart

protected void descheduleSessionStart(SessionParameters params)

startSession

public void startSession(SessionParameters params)
Allow connection to specified session manually.

Parameters:
params - session details

scheduleSessionStop

public void scheduleSessionStop(String cronExpr,
                                SessionParameters params)
Schedule the end of period when incoming connections for specified session are allowed.

Parameters:
cronExpr - CRON expression
params - session details

descheduleSessionStop

protected void descheduleSessionStop(SessionParameters params)

stopSession

public void stopSession(SessionParameters params)
Stop specified session and deny connection manually.

Parameters:
params - session details

cancelSessionSchedule

public void cancelSessionSchedule(SessionParameters params)
Cancel all scheduled tasks for specified session and allow default connection behaviour for it.

Parameters:
params - session details

scheduleAllowSessions

public void scheduleAllowSessions(String cronExpr)
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()

scheduleDenySessions

public void scheduleDenySessions(String cronExpr)
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().



Copyright © 2000-2014 EPAM Systems. All Rights Reserved.