|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.esper.adapter.AbstractCoordinatedAdapter
public abstract class AbstractCoordinatedAdapter
A skeleton implementation of the ReadableAdapter interface.
Field Summary | |
---|---|
protected SortedSet<SendableEvent> |
eventsToSend
|
protected net.esper.schedule.ScheduleSlot |
scheduleSlot
|
protected AdapterStateManager |
stateManager
|
Constructor Summary | |
---|---|
AbstractCoordinatedAdapter(net.esper.client.EPServiceProvider epService,
boolean usingEngineThread)
Ctor. |
Method Summary | |
---|---|
protected abstract void |
close()
Perform any actions specific to this Adapter that should be completed before the Adapter is stopped. |
void |
destroy()
Destroy the InputAdapter, stopping the sending of all events and releasing all the resources, and disallowing any further state changes on the InputAdapter. |
void |
disallowStateTransitions()
Disallow subsequent state changes and throw an IllegalStateTransitionException if they are attempted. |
AdapterState |
getState()
Get the state of this InputAdapter. |
void |
pause()
Pause the sending of events after a Adapter has been started. |
protected abstract void |
replaceFirstEventToSend()
Remove the first member of eventsToSend and insert another event chosen in some fashion specific to this Adapter. |
protected abstract void |
reset()
Reset all the changeable state of this Adapter, as if it were just created. |
void |
resume()
Resume sending events after the InputAdapter has been paused. |
void |
setEPService(net.esper.client.EPServiceProvider epService)
Set the epService |
void |
setScheduleSlot(net.esper.schedule.ScheduleSlot scheduleSlot)
Set the scheduleSlot for this Adapter. |
void |
setUsingEngineThread(boolean usingEngineThread)
Set the usingEngineThread value |
void |
start()
Start the sending of events into the runtime egine. |
void |
stop()
Stop sending events and return the Adapter to the OPENED state, ready to be started once again. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.esper.adapter.CoordinatedAdapter |
---|
read |
Field Detail |
---|
protected final AdapterStateManager stateManager
protected final SortedSet<SendableEvent> eventsToSend
protected net.esper.schedule.ScheduleSlot scheduleSlot
Constructor Detail |
---|
public AbstractCoordinatedAdapter(net.esper.client.EPServiceProvider epService, boolean usingEngineThread)
epService
- - the EPServiceProvider for the engine runtime and servicesusingEngineThread
- - true if the Adapter should set time by the scheduling service in the engine,
false if it should set time externally through the calling threadMethod Detail |
---|
public AdapterState getState()
InputAdapter
getState
in interface InputAdapter
public void start() throws net.esper.client.EPException
InputAdapter
start
in interface InputAdapter
net.esper.client.EPException
- in case of errors processing the eventspublic void pause() throws net.esper.client.EPException
InputAdapter
pause
in interface InputAdapter
net.esper.client.EPException
- if this Adapter has already been stoppedpublic void resume() throws net.esper.client.EPException
InputAdapter
resume
in interface InputAdapter
net.esper.client.EPException
- in case of errors processing the eventspublic void destroy() throws net.esper.client.EPException
InputAdapter
destroy
in interface InputAdapter
net.esper.client.EPException
public void stop() throws net.esper.client.EPException
InputAdapter
stop
in interface InputAdapter
net.esper.client.EPException
- in case of errors releasing resourcespublic void disallowStateTransitions()
CoordinatedAdapter
disallowStateTransitions
in interface CoordinatedAdapter
public void setUsingEngineThread(boolean usingEngineThread)
CoordinatedAdapter
setUsingEngineThread
in interface CoordinatedAdapter
usingEngineThread
- - the value to setpublic void setScheduleSlot(net.esper.schedule.ScheduleSlot scheduleSlot)
CoordinatedAdapter
setScheduleSlot
in interface CoordinatedAdapter
scheduleSlot
- - the scheduleSlot to setpublic void setEPService(net.esper.client.EPServiceProvider epService)
CoordinatedAdapter
setEPService
in interface CoordinatedAdapter
epService
- - the value to setprotected abstract void close()
protected abstract void replaceFirstEventToSend()
protected abstract void reset()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |