|
|||||||||||
| 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(java.lang.String[] checkTime,
int dateNum,
int whichDate)
Checks if the date specified is correct |
void |
checkDay(java.lang.String month,
int dateNum,
java.lang.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 |
java.lang.String |
getMaskSchedule()
Retrieves the schedule to next run |
java.lang.String |
getMonthValue(java.lang.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. |
java.lang.String |
getVersion()
Return version information |
java.lang.String |
getWeekValue(java.lang.String strWeekDay)
Translates day of the week to number |
void |
initialize(java.lang.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(java.lang.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 java.lang.Exception
selectEntries in interface ConnectorInterfaceselectEntries in class Connectorjava.lang.Exception - never
public void initialize(java.lang.Object o)
throws java.lang.Exception
initialize in interface ConnectorInterfaceinitialize in class Connectoro - User provided parameter
java.lang.Exception - if the initialization of this connector fails.public void setNextEntry(Entry e)
e - next clien
public Entry getNextEntry()
throws java.lang.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 Connectorjava.lang.Exception - if an error occurs.ConnectorInterface.selectEntries()
public ConnectorInterface getNextClient()
throws java.lang.Exception
getNextClient in interface ConnectorInterfacegetNextClient in class Connectorjava.lang.Exception - if an error occurs.
public void checkDay(java.lang.String month,
int dateNum,
java.lang.String[] checkTime)
throws java.lang.Exception
month - month namedateNum - date numbercheckTime - time
java.lang.Exception - if the day is not valid
public void checkDate(java.lang.String[] checkTime,
int dateNum,
int whichDate)
throws java.lang.Exception
checkTime - timedateNum - month numberwhichDate - date number
java.lang.Exception - if an error occurs
public void validSchedule(java.lang.String[] checkTime)
throws java.lang.Exception
checkTime - time to be checked
java.lang.Exception - if a problem occurs
public void calcNextRun()
throws java.lang.Exception
java.lang.Exception - if schedule is invalid or missing
public void doWait(long p1,
long p2)
throws java.lang.InterruptedException
p1 - wait untilp2 - current time in milliseconds
java.lang.InterruptedException - if the connector is interruptedpublic boolean sleepSeconds(long p1)
p1 - time to wait
public java.lang.String getMaskSchedule()
public java.lang.String getMonthValue(java.lang.String strMonth)
strMonth - string representation
public java.lang.String getWeekValue(java.lang.String strWeekDay)
strWeekDay - string representation
public java.lang.String getVersion()
getVersion in interface VersionInfoInterface
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||