Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| jBPM distribution 6.0.0.Beta2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jbpm.process.core.timer.impl
Class RegisteredTimerServiceDelegate

    java.lang.Object
      org.jbpm.process.core.timer.impl.RegisteredTimerServiceDelegate

All Implemented Interfaces:
  org.drools.core.time.AcceptsTimerJobFactoryManager, org.drools.core.time.InternalSchedulerService, org.drools.core.time.SchedulerService, org.drools.core.time.TimerService, SessionClock

    public class RegisteredTimerServiceDelegate

extends Object
implements org.drools.core.time.TimerService, org.drools.core.time.InternalSchedulerService, org.drools.core.time.AcceptsTimerJobFactoryManager, SessionClock

Simple delegate for timer service that fetches the real instance of timer service from TimerServiceRegistry under "default" key. That requires TimerService to be registered prior to using this delegate, which usually means before any session is created. This delegate should be configured in session configuration so when initializing it will use right TimerService implementation: `Properties conf = new Properties(); conf.setProperty("drools.timerService", "org.jbpm.process.core.timer.impl.RegisteredTimerServiceDelegate"); KieSessionConfiguration sessionConf = KnowledgeBaseFactory.newKnowledgeSessionConfiguration(conf);`

Constructor Summary
`RegisteredTimerServiceDelegate()`
`RegisteredTimerServiceDelegate(String timerServiceKey)`

Method Summary
`long` | `getCurrentTime()` Returns the current time.
`org.drools.core.time.impl.TimerJobFactoryManager` | `getTimerJobFactoryManager()`
`Collection<org.drools.core.time.impl.TimerJobInstance>` | `getTimerJobInstances(int id)`
`long` | `getTimeToNextJob()`
`void` | `internalSchedule(org.drools.core.time.impl.TimerJobInstance timerJobInstance)`
`boolean` | `removeJob(org.drools.core.time.JobHandle jobHandle)`
`org.drools.core.time.JobHandle` | `scheduleJob(org.drools.core.time.Job job, org.drools.core.time.JobContext ctx, org.drools.core.time.Trigger trigger)`
`void` | `setTimerJobFactoryManager(org.drools.core.time.impl.TimerJobFactoryManager timerJobFactoryManager)`
`void` | `shutdown()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### RegisteredTimerServiceDelegate

    public RegisteredTimerServiceDelegate()

### RegisteredTimerServiceDelegate

    public RegisteredTimerServiceDelegate(String timerServiceKey)

Method Detail

### scheduleJob

    public org.drools.core.time.JobHandle scheduleJob(org.drools.core.time.Job job,
                                                      org.drools.core.time.JobContext ctx,
                                                      org.drools.core.time.Trigger trigger)

  Specified by:
    `scheduleJob` in interface `org.drools.core.time.SchedulerService`

### removeJob

    public boolean removeJob(org.drools.core.time.JobHandle jobHandle)

  Specified by:
    `removeJob` in interface `org.drools.core.time.SchedulerService`

### setTimerJobFactoryManager

    public void setTimerJobFactoryManager(org.drools.core.time.impl.TimerJobFactoryManager timerJobFactoryManager)

  Specified by:
    `setTimerJobFactoryManager` in interface `org.drools.core.time.AcceptsTimerJobFactoryManager`

### getTimerJobFactoryManager

    public org.drools.core.time.impl.TimerJobFactoryManager getTimerJobFactoryManager()

  Specified by:
    `getTimerJobFactoryManager` in interface `org.drools.core.time.AcceptsTimerJobFactoryManager`

### internalSchedule

    public void internalSchedule(org.drools.core.time.impl.TimerJobInstance timerJobInstance)

  Specified by:
    `internalSchedule` in interface `org.drools.core.time.InternalSchedulerService`

### getCurrentTime

    public long getCurrentTime()

  Description copied from interface: `SessionClock`
  Returns the current time. There is no semantics attached to the long return value, so it will depend on the actual implementation. For instance, for a real time clock it may be milliseconds.

  Specified by:
    `getCurrentTime` in interface `org.drools.core.time.TimerService`
  Specified by:
    `getCurrentTime` in interface `SessionClock`
  Returns:
    The current time. The unit of the time, depends on the actual clock implementation.

### shutdown

    public void shutdown()

  Specified by:
    `shutdown` in interface `org.drools.core.time.TimerService`

### getTimeToNextJob

    public long getTimeToNextJob()

  Specified by:
    `getTimeToNextJob` in interface `org.drools.core.time.TimerService`

### getTimerJobInstances

    public Collection<org.drools.core.time.impl.TimerJobInstance> getTimerJobInstances(int id)

  Specified by:
    `getTimerJobInstances` in interface `org.drools.core.time.TimerService`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| jBPM distribution 6.0.0.Beta2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2013 JBoss by Red Hat. All Rights Reserved.