|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.ibm.websphere.samples.scheduler.accountreportejb.SampleCalendarBean
public class SampleCalendarBean
Implements a UserCalendar which will increment a given date by N seconds. UserCalendar session beans can implement the UserCalendarBean interface so that the method signatures are checked at compile time.
| Constructor Summary | |
|---|---|
SampleCalendarBean()
|
|
| Method Summary | |
|---|---|
java.util.Date |
applyDelta(java.util.Date baseTime,
java.lang.String calendar,
java.lang.String delta)
Increments the base time by a delta. |
void |
ejbActivate()
A container invokes this method when the instance is taken out of the pool of available instances to become associated with a specific EJB object. |
void |
ejbCreate()
A container invokes this method when it creates the EJB object |
void |
ejbPassivate()
A container invokes this method on an instance before the instance becomes disassociated with a specific EJB object. |
void |
ejbRemove()
A container invokes this method before it removes the EJB object that is currently associated with the instance. |
java.lang.String[] |
getCalendarNames()
Retrieves an array of valid calendar names that this UserCalendar implementation supports. |
void |
setSessionContext(javax.ejb.SessionContext ctx)
Set the associated session context. |
void |
validate(java.lang.String calendar,
java.lang.String delta)
Checks that a given delta String is suitable for use with this calendar. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SampleCalendarBean()
| Method Detail |
|---|
public void validate(java.lang.String calendar,
java.lang.String delta)
throws com.ibm.websphere.scheduler.UserCalendarSpecifierInvalid,
com.ibm.websphere.scheduler.UserCalendarPeriodInvalid
calendar - The calendar to checkdelta - The delta to be checked
com.ibm.websphere.scheduler.UserCalendarSpecifierInvalid - if the calendar parameter is not "seconds"
com.ibm.websphere.scheduler.UserCalendarPeriodInvalid - if the delta is not suitable for use with this calendar
public java.util.Date applyDelta(java.util.Date baseTime,
java.lang.String calendar,
java.lang.String delta)
throws com.ibm.websphere.scheduler.UserCalendarSpecifierInvalid,
com.ibm.websphere.scheduler.UserCalendarPeriodInvalid
baseTime - The base time to which the increment will be addedcalendar - Used by this calendar bean to specify the unit to be scaled.
The only accepted value at this time is "seconds"delta - A scalar which determines how much to add onto the base time. The
unit to be scaled is determined by the calendar parameter.
com.ibm.websphere.scheduler.UserCalendarSpecifierInvalid - if the calendar parameter is not "seconds"
com.ibm.websphere.scheduler.UserCalendarPeriodInvalid - if the delta is not suitable for use with this calendarpublic java.lang.String[] getCalendarNames()
public void ejbCreate()
throws javax.ejb.CreateException
EJBException - Thrown by the method to indicate a failure caused by a system-level error.
javax.ejb.CreateExceptionpublic void ejbActivate()
ejbActivate in interface javax.ejb.SessionBeanEJBException - Thrown by the method to indicate a failure caused by a system-level error.public void ejbPassivate()
ejbPassivate in interface javax.ejb.SessionBeanEJBException - Thrown by the method to indicate a failure caused by a system-level error.public void ejbRemove()
ejbRemove in interface javax.ejb.SessionBeanEJBException - Thrown by the method to indicate a failure caused by a system-level error.public void setSessionContext(javax.ejb.SessionContext ctx)
setSessionContext in interface javax.ejb.SessionBeanctx - A SessionContext interface for the instance. The instance should store the reference
to the context in an instance variable.
EJBException - Thrown by the method to indicate a failure caused by a system-level error.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||