biz.onixs.fix.scheduler
Class SessionScheduler

java.lang.Object
  extended by biz.onixs.fix.scheduler.SessionScheduler

public class SessionScheduler
extends Object

Session scheduler.
The scheduler performs session connection maintenance according to the specified schedule. It monitors when a particular session must be active and automatically executes appropriate action.


Constructor Summary
SessionScheduler()
          Initializes scheduler service with default configuration.
 
Method Summary
 ListenerManager getListenerManager()
           
 void register(Session session, SchedulerSettings settings, String scheduleId)
          Registers acceptor session.
This method is a thread-safe.
 void register(Session session, SchedulerSettings settings, String scheduleId, SessionConnection connection)
          Registers session.
This method is a thread-safe.
 void register(Session session, SchedulerSettings settings, String scheduleId, String connectionId)
          Registers session.
This method is a thread-safe.
 void register(Session session, SessionSchedule schedule)
          Registers acceptor session.
This method is a thread-safe.
 void register(Session session, SessionSchedule schedule, SchedulerSettings settings, String connectionId)
          Registers session.
This method is a thread-safe.
 void register(Session session, SessionSchedule schedule, SessionConnection connection)
          Registers session.
This method is a thread-safe.
 void start()
          Starts scheduler service.
 void stop()
          Stops scheduler service.
 void unregister(Session session)
          Un-registers session.
This method is a thread-safe.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionScheduler

public SessionScheduler()
                 throws SessionSchedulerException
Initializes scheduler service with default configuration.

Throws:
SessionSchedulerException - if creation failed
Method Detail

start

public void start()
           throws SessionSchedulerException
Starts scheduler service.

Throws:
SessionSchedulerException - if start failed

stop

public void stop()
          throws SessionSchedulerException
Stops scheduler service.

Throws:
SessionSchedulerException - if stop failed

register

public void register(Session session,
                     SessionSchedule schedule)
              throws SessionSchedulerException
Registers acceptor session.
This method is a thread-safe.

Parameters:
session - FIX session
schedule - session schedule
Throws:
SessionSchedulerException - if scheduling failed

register

public void register(Session session,
                     SessionSchedule schedule,
                     SessionConnection connection)
              throws SessionSchedulerException
Registers session.
This method is a thread-safe.

Parameters:
session - FIX session
schedule - schedule for the given session
connection - connection settings for the given session
Throws:
SessionSchedulerException - if scheduling failed

register

public void register(Session session,
                     SchedulerSettings settings,
                     String scheduleId)
              throws SessionSchedulerException
Registers acceptor session.
This method is a thread-safe.

Parameters:
session - FIX session
settings - scheduler settings
scheduleId - schedule id in the scheduler settings
Throws:
SessionSchedulerException - if scheduling failed
IllegalArgumentException - if schedule with the scheduleId is not found in the settings

register

public void register(Session session,
                     SchedulerSettings settings,
                     String scheduleId,
                     String connectionId)
              throws SessionSchedulerException
Registers session.
This method is a thread-safe.

Parameters:
session - FIX session
settings - scheduler settings
scheduleId - schedule id in the scheduler settings
connectionId - connection id in the scheduler settings
Throws:
SessionSchedulerException - if scheduling failed
IllegalArgumentException - if schedule with the scheduleId is not found in the settings or if connection with connectionId is not found in the settings

register

public void register(Session session,
                     SessionSchedule schedule,
                     SchedulerSettings settings,
                     String connectionId)
              throws SessionSchedulerException
Registers session.
This method is a thread-safe.

Parameters:
session - FIX session
schedule - session schedule
settings - scheduler settings
connectionId - connection id in the scheduler settings
Throws:
SessionSchedulerException - if scheduling failed
IllegalArgumentException - if connection with the connectionId is not found in the settings

register

public void register(Session session,
                     SchedulerSettings settings,
                     String scheduleId,
                     SessionConnection connection)
              throws SessionSchedulerException
Registers session.
This method is a thread-safe.

Parameters:
session - FIX session
settings - scheduler settings
scheduleId - schedule id in the scheduler settings
connection - session connection
Throws:
SessionSchedulerException - if scheduling failed
IllegalArgumentException - if schedule with the scheduleId is not found in the settings

unregister

public void unregister(Session session)
                throws SessionSchedulerException
Un-registers session.
This method is a thread-safe.

Parameters:
session - FIX session
Throws:
SessionSchedulerException - if un-register failed

getListenerManager

public ListenerManager getListenerManager()


Copyright © 2005-2012 Onix Solutions. All Rights Reserved.