Package com.isode.som.qmgr.objects
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
-
-
Field Summary
-
Fields inherited from class com.isode.som.qmgr.objects.SomQmgrObject
errortext, somSession
-
-
Constructor Summary
Constructors Constructor Description SomQmgrSchedule(SomSession session, java.lang.String id)Create a new SomQmgrAssociation object for a specified channel and MTASomQmgrSchedule(SomSession session, java.lang.String id, java.lang.String[] pairs)Create a new SomQmgrAssociation object for a specified channel and MTA, populating it with data from type/value pairs
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanactive()Find out if this association is currently activejava.lang.IntegerassocIndex()Get the association index value for the schedulejava.lang.StringbuildInfoString()Get an information string for this schedulevoidhandleBindResponse(int status, java.lang.String detail)Handle the response to a Bind operationvoidhandleResponse(SomCommand obj, int status, SomMessage msg)Handles the response to commands which return a SomMessage object (i.e.voidhandleResponse(SomCommand command, int status, SomQmgrChannel object)Handles the response to commands which return a list of channel objectsvoidhandleResponse(SomCommand command, int status, SomQmgrMessage object)Handles the response to commands which return a list of message objectsvoidhandleResponse(SomCommand command, int status, SomQmgrMta object)Handles the response to commands which return a list of MTA objectsvoidhandleResponse(SomCommand command, int status, SomQmgrQueueManager object)voidhandleResponse(SomCommand command, int status, java.lang.String detail)Handles the response to control commands which return an OK/error response plus an info stringvoidhandleResponse(SomCommand command, int status, java.lang.String[] pairs)Handles the response to commands which return data about the current object - i.e.booleanpermanent()Find out if this association is permanentjava.lang.Integerpriority()Get priority filter valuejava.lang.IntegerscheduleId()Get schedule idjava.lang.Stringstart()Get string indicating the start time and date for this schedulejava.lang.Stringstarttime()Get string indicating the start time for this schedulejava.lang.Stringstop()Get string indicating the stop time and date for this schedulejava.lang.Stringstoptime()Get string indicating the stop time for this schedulejava.lang.Stringweekdays()Get a string indicating on which days the schedule is active-
Methods inherited from class com.isode.som.qmgr.objects.SomQmgrObject
addAttribute, addAttribute, addBindListener, clearAttributes, getBooleanAttributeValue, getDoubleAttributeValue, getIntegerAttributeValue, getSession, getStringAttributeValue, notifyBindListeners, notifyListener, notifyListeners, parsePairs, print, print_str, removeBindListener, setSkipNotifications
-
-
-
-
Constructor Detail
-
SomQmgrSchedule
public SomQmgrSchedule(SomSession session, java.lang.String id)
Create a new SomQmgrAssociation object for a specified channel and MTA- Parameters:
session- Session object for association which may not be nullid- schedule id which may not be null
-
SomQmgrSchedule
public SomQmgrSchedule(SomSession session, java.lang.String id, java.lang.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 nullid- schedule id which may not be nullpairs- Array of data pairs which may not be null
-
-
Method Detail
-
scheduleId
public java.lang.Integer scheduleId()
Get schedule id- Returns:
- schedule ID
-
assocIndex
public java.lang.Integer assocIndex() throws SomExceptionGet the association index value for the schedule- Returns:
- association index
- Throws:
SomException- on error
-
permanent
public boolean permanent() throws SomExceptionFind out if this association is permanent- Returns:
- true if permanent
- Throws:
SomException- on error
-
active
public boolean active() throws SomExceptionFind out if this association is currently active- Returns:
- true if active
- Throws:
SomException- on error
-
priority
public java.lang.Integer priority() throws SomExceptionGet priority filter value- Returns:
- priority value
- Throws:
SomException- on error
-
weekdays
public java.lang.String weekdays() throws SomExceptionGet a string indicating on which days the schedule is active- Returns:
- days-of-week string
- Throws:
SomException- on error
-
starttime
public java.lang.String starttime() throws SomExceptionGet string indicating the start time for this schedule- Returns:
- time string
- Throws:
SomException- on error
-
stoptime
public java.lang.String stoptime() throws SomExceptionGet string indicating the stop time for this schedule- Returns:
- time string
- Throws:
SomException- on error
-
start
public java.lang.String start() throws SomExceptionGet string indicating the start time and date for this schedule- Returns:
- UTC time string
- Throws:
SomException- on error
-
stop
public java.lang.String stop() throws SomExceptionGet 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, java.lang.String detail)
Description copied from interface:SomQmgrHandlerHandles the response to control commands which return an OK/error response plus an info string- Specified by:
handleResponsein interfaceSomHandler- Specified by:
handleResponsein interfaceSomQmgrHandler- Parameters:
command- the SOM commandstatus- operation statusdetail- 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:SomQmgrHandlerHandles the response to commands which return a list of channel objects- Specified by:
handleResponsein interfaceSomQmgrHandler- Parameters:
command- the SOM commandstatus- operation statusobject- a channel object
-
handleResponse
public void handleResponse(SomCommand command, int status, SomQmgrMta object)
Description copied from interface:SomQmgrHandlerHandles the response to commands which return a list of MTA objects- Specified by:
handleResponsein interfaceSomQmgrHandler- Parameters:
command- the SOM commandstatus- operation statusobject- a SOM Qmgr MTA object
-
handleResponse
public void handleResponse(SomCommand command, int status, SomQmgrMessage object)
Description copied from interface:SomQmgrHandlerHandles the response to commands which return a list of message objects- Specified by:
handleResponsein interfaceSomQmgrHandler- Parameters:
command- the SOM commandstatus- operation statusobject- a qmgr message object
-
handleBindResponse
public void handleBindResponse(int status, java.lang.String detail)Description copied from interface:SomHandlerHandle the response to a Bind operation- Specified by:
handleBindResponsein interfaceSomHandler- Parameters:
status- operation statusdetail- error detail on failure
-
handleResponse
public void handleResponse(SomCommand obj, int status, SomMessage msg)
Description copied from interface:SomQmgrHandlerHandles the response to commands which return a SomMessage object (i.e. read from the Queue or Archive).- Specified by:
handleResponsein interfaceSomQmgrHandler- Parameters:
obj- the SOM commandstatus- operation statusmsg- a message object
-
handleResponse
public void handleResponse(SomCommand command, int status, java.lang.String[] pairs)
Description copied from interface:SomQmgrHandlerHandles the response to commands which return data about the current object - i.e. we are refreshing an existing object.- Specified by:
handleResponsein interfaceSomQmgrHandler- Parameters:
command- the SOM commandstatus- operation statuspairs- data pairs
-
buildInfoString
public java.lang.String buildInfoString()
Get an information string for this schedule- Returns:
- information string
-
-