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 boolean
active()
Find out if this association is currently activejava.lang.Integer
assocIndex()
Get the association index value for the schedulejava.lang.String
buildInfoString()
Get an information string for this schedulevoid
handleBindResponse(int status, java.lang.String detail)
Handle the response to a Bind operationvoid
handleResponse(SomCommand obj, int status, SomMessage msg)
Handles the response to commands which return a SomMessage object (i.e.void
handleResponse(SomCommand command, int status, SomQmgrChannel object)
Handles the response to commands which return a list of channel objectsvoid
handleResponse(SomCommand command, int status, SomQmgrMessage object)
Handles the response to commands which return a list of message objectsvoid
handleResponse(SomCommand command, int status, SomQmgrMta object)
Handles the response to commands which return a list of MTA objectsvoid
handleResponse(SomCommand command, int status, SomQmgrQueueManager object)
void
handleResponse(SomCommand command, int status, java.lang.String detail)
Handles the response to control commands which return an OK/error response plus an info stringvoid
handleResponse(SomCommand command, int status, java.lang.String[] pairs)
Handles the response to commands which return data about the current object - i.e.boolean
permanent()
Find out if this association is permanentjava.lang.Integer
priority()
Get priority filter valuejava.lang.Integer
scheduleId()
Get schedule idjava.lang.String
start()
Get string indicating the start time and date for this schedulejava.lang.String
starttime()
Get string indicating the start time for this schedulejava.lang.String
stop()
Get string indicating the stop time and date for this schedulejava.lang.String
stoptime()
Get string indicating the stop time for this schedulejava.lang.String
weekdays()
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 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 java.lang.Integer priority() throws SomException
Get priority filter value- Returns:
- priority value
- Throws:
SomException
- on error
-
weekdays
public java.lang.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 java.lang.String starttime() throws SomException
Get string indicating the start time for this schedule- Returns:
- time string
- Throws:
SomException
- on error
-
stoptime
public java.lang.String stoptime() throws SomException
Get string indicating the stop time for this schedule- Returns:
- time string
- Throws:
SomException
- on error
-
start
public java.lang.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 java.lang.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, java.lang.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 interfaceSomHandler
- Specified by:
handleResponse
in 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:SomQmgrHandler
Handles the response to commands which return a list of channel objects- Specified by:
handleResponse
in 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:SomQmgrHandler
Handles the response to commands which return a list of MTA objects- Specified by:
handleResponse
in 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:SomQmgrHandler
Handles the response to commands which return a list of message objects- Specified by:
handleResponse
in 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:SomHandler
Handle the response to a Bind operation- Specified by:
handleBindResponse
in interfaceSomHandler
- Parameters:
status
- operation statusdetail
- 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 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: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 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
-
-