Class SomQmgrSchedule

java.lang.Object
com.isode.som.qmgr.objects.SomQmgrObject
com.isode.som.qmgr.objects.SomQmgrSchedule
All Implemented Interfaces:
SomQmgrHandler, SomHandler

public class SomQmgrSchedule extends SomQmgrObject implements SomQmgrHandler
This class models a schedule set up with a peer MTA.
Author:
tc
  • Constructor Details

    • SomQmgrSchedule

      public SomQmgrSchedule(SomSession session, String id)
      Create a new SomQmgrAssociation object for a specified channel and MTA
      Parameters:
      session - Session object for association which may not be null
      id - schedule id which may not be null
    • SomQmgrSchedule

      public SomQmgrSchedule(SomSession session, String id, String[] pairs)
      Create a new SomQmgrAssociation object for a specified channel and MTA, populating it with data from type/value pairs
      Parameters:
      session - Session object for association which may not be null
      id - schedule id which may not be null
      pairs - Array of data pairs which may not be null
  • Method Details

    • scheduleId

      public Integer scheduleId()
      Get schedule id
      Returns:
      schedule ID
    • assocIndex

      public Integer assocIndex() throws SomException
      Get the association index value for the schedule
      Returns:
      association index
      Throws:
      SomException - on error
    • permanent

      public boolean permanent() throws SomException
      Find out if this association is permanent
      Returns:
      true if permanent
      Throws:
      SomException - on error
    • active

      public boolean active() throws SomException
      Find out if this association is currently active
      Returns:
      true if active
      Throws:
      SomException - on error
    • priority

      public Integer priority() throws SomException
      Get priority filter value
      Returns:
      priority value
      Throws:
      SomException - on error
    • weekdays

      public String weekdays() throws SomException
      Get a string indicating on which days the schedule is active
      Returns:
      days-of-week string
      Throws:
      SomException - on error
    • starttime

      public String starttime() throws SomException
      Get string indicating the start time for this schedule
      Returns:
      time string
      Throws:
      SomException - on error
    • stoptime

      public String stoptime() throws SomException
      Get string indicating the stop time for this schedule
      Returns:
      time string
      Throws:
      SomException - on error
    • start

      public String start() throws SomException
      Get string indicating the start time and date for this schedule
      Returns:
      UTC time string
      Throws:
      SomException - on error
    • stop

      public String stop() throws SomException
      Get string indicating the stop time and date for this schedule
      Returns:
      UTC time string
      Throws:
      SomException - on error
    • handleResponse

      public void handleResponse(SomCommand command, int status, String detail)
      Description copied from interface: SomQmgrHandler
      Handles the response to control commands which return an OK/error response plus an info string
      Specified by:
      handleResponse in interface SomHandler
      Specified by:
      handleResponse in interface SomQmgrHandler
      Parameters:
      command - the SOM command
      status - operation status
      detail - detail on error
    • handleResponse

      public void handleResponse(SomCommand command, int status, SomQmgrQueueManager object)
    • handleResponse

      public void handleResponse(SomCommand command, int status, SomQmgrChannel object)
      Description copied from interface: SomQmgrHandler
      Handles the response to commands which return a list of channel objects
      Specified by:
      handleResponse in interface SomQmgrHandler
      Parameters:
      command - the SOM command
      status - operation status
      object - a channel object
    • handleResponse

      public void handleResponse(SomCommand command, int status, SomQmgrMta object)
      Description copied from interface: SomQmgrHandler
      Handles the response to commands which return a list of MTA objects
      Specified by:
      handleResponse in interface SomQmgrHandler
      Parameters:
      command - the SOM command
      status - operation status
      object - a SOM Qmgr MTA object
    • handleResponse

      public void handleResponse(SomCommand command, int status, SomQmgrMessage object)
      Description copied from interface: SomQmgrHandler
      Handles the response to commands which return a list of message objects
      Specified by:
      handleResponse in interface SomQmgrHandler
      Parameters:
      command - the SOM command
      status - operation status
      object - a qmgr message object
    • handleBindResponse

      public void handleBindResponse(int status, String detail)
      Description copied from interface: SomHandler
      Handle the response to a Bind operation
      Specified by:
      handleBindResponse in interface SomHandler
      Parameters:
      status - operation status
      detail - error detail on failure
    • handleResponse

      public void handleResponse(SomCommand obj, int status, SomMessage msg)
      Description copied from interface: SomQmgrHandler
      Handles the response to commands which return a SomMessage object (i.e. read from the Queue or Archive).
      Specified by:
      handleResponse in interface SomQmgrHandler
      Parameters:
      obj - the SOM command
      status - operation status
      msg - a message object
    • handleResponse

      public void handleResponse(SomCommand command, int status, String[] pairs)
      Description copied from interface: SomQmgrHandler
      Handles the response to commands which return data about the current object - i.e. we are refreshing an existing object.
      Specified by:
      handleResponse in interface SomQmgrHandler
      Parameters:
      command - the SOM command
      status - operation status
      pairs - data pairs
    • buildInfoString

      public String buildInfoString()
      Get an information string for this schedule
      Returns:
      information string