|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.ibm.di.connector.Connector
com.ibm.di.connector.TimerConnector
public class TimerConnector
This connector provides a simplistic version of a crontab style timer.
| Field Summary |
|---|
| Fields inherited from class com.ibm.di.connector.Connector |
|---|
ALL_MODES, myLog, PROPERTY_MESSAGE, PROPERTY_READER, PROPERTY_WRITER |
| Constructor Summary | |
|---|---|
TimerConnector()
Class constructor |
|
| Method Summary | |
|---|---|
void |
calcNextRun()
Calculates the next run |
void |
checkDate(String[] checkTime,
int dateNum,
int whichDate)
Checks if the date specified is correct |
void |
checkDay(String month,
int dateNum,
String[] checkTime)
Checks if the specified day options are correct |
void |
doWait(long p1,
long p2)
Connector waits for the specified difference in the parameters |
String |
getMaskSchedule()
Retrieves the schedule to next run |
String |
getMonthValue(String strMonth)
Translates month of the year to number |
ConnectorInterface |
getNextClient()
Server mode - return a clone of self that handles the next client instance when running in server mode. |
Entry |
getNextEntry()
Returns the next Entry from the connector. |
String |
getVersion()
Return version information |
String |
getWeekValue(String strWeekDay)
Translates day of the week to number |
void |
initialize(Object o)
Initialize the connector. |
void |
selectEntries()
Default implementation |
void |
setNextEntry(Entry e)
Sets next entry for server mode |
boolean |
sleepSeconds(long p1)
This function is not used directly, but maybe some old configurations use this.Connector sleeps for the specified time |
void |
validSchedule(String[] checkTime)
Verifies the the schedule is correct |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.ibm.di.connector.ConnectorInterface |
|---|
deleteEntry, findEntry, getConfiguration, getContext, getFindEntryCount, getFirstFindEntry, getMaxDuplicateEntries, getName, getNextFindEntry, getParam, getPushbackEntry, getRawConnectorConfiguration, isDeltaSupported, isExceptionFatal, isIOException, modEntry, modEntry, pushback, putEntry, queryOperations, queryReply, querySchema, reconnect, registerScriptBeans, replyEntry, setConfiguration, setContext, setCurrent, setLog, setMaxDuplicateEntries, setName, setParam, setRSInterface, terminate, terminateServer |
| Constructor Detail |
|---|
public TimerConnector()
| Method Detail |
|---|
public void selectEntries()
throws Exception
selectEntries in interface ConnectorInterfaceselectEntries in class ConnectorException - never
public void initialize(Object o)
throws Exception
initialize in interface ConnectorInterfaceinitialize in class Connectoro - User provided parameter
Exception - if the initialization of this connector fails.public void setNextEntry(Entry e)
e - next clien
public Entry getNextEntry()
throws Exception
Example:
var ctor = input.getConnector();
var entry = ctor.getNextEntry();
for (; entry != null; entry = ctor.getNextEntry()) {
main.logmsg("Read entry...");
main.dumpEntry(entry);
}
getNextEntry in interface ConnectorInterfacegetNextEntry in class ConnectorException - if an error occurs.ConnectorInterface.selectEntries()
public ConnectorInterface getNextClient()
throws Exception
getNextClient in interface ConnectorInterfacegetNextClient in class ConnectorException - if an error occurs.
public void checkDay(String month,
int dateNum,
String[] checkTime)
throws Exception
month - month namedateNum - date numbercheckTime - time
Exception - if the day is not valid
public void checkDate(String[] checkTime,
int dateNum,
int whichDate)
throws Exception
checkTime - timedateNum - month numberwhichDate - date number
Exception - if an error occurs
public void validSchedule(String[] checkTime)
throws Exception
checkTime - time to be checked
Exception - if a problem occurs
public void calcNextRun()
throws Exception
Exception - if schedule is invalid or missing
public void doWait(long p1,
long p2)
throws InterruptedException
p1 - wait untilp2 - current time in milliseconds
InterruptedException - if the connector is interruptedpublic boolean sleepSeconds(long p1)
p1 - time to wait
public String getMaskSchedule()
public String getMonthValue(String strMonth)
strMonth - string representation
public String getWeekValue(String strWeekDay)
strWeekDay - string representation
public String getVersion()
getVersion in interface VersionInfoInterface
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||