Class AbstractPushController
java.lang.Object
java.lang.Thread
de.hybris.platform.core.threadregistry.RegistrableThread
de.hybris.platform.cockpit.session.impl.AbstractPushController
- All Implemented Interfaces:
PushController,Runnable
- Direct Known Subclasses:
CommentPushController,WorkflowPushController
Class to be used as super class when implementing a standard Cockpit
PushController.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsFields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
ConstructorsConstructorDescriptionAbstractPushController(PushComponent pushComp) AbstractPushController(PushComponent pushComp, int updateInterval) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddEvent(CockpitEvent cockpitEvent) protected abstract voidafter()protected abstract voidbefore()Returns this push controller'sPushComponent.protected org.zkoss.zk.ui.Desktopprotected UISessionintReturns the update interval in milliseconds for this push controller.protected org.springframework.web.context.WebApplicationContextprotected voidprotected booleanisDone()protected voidvoidsetComponent(PushComponent component) Sets thePushComponentto be used by this push controller tocomponent.voidsetDone()Tells this push controller to stop processing server push events.voidsetParameters(Map<String, Object> params) voidsetUpdateInterval(int milliseconds) Sets the update interval in milliseconds for this push controller.voidStarts this push controller.toString()Methods inherited from class de.hybris.platform.core.threadregistry.RegistrableThread
registerThread, run, unregisterThread, withInitialInfoMethods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, yieldMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface de.hybris.platform.cockpit.session.PushController
isUpdateNeeded, update
-
Field Details
-
DEFAULT_DELAY
protected static final int DEFAULT_DELAY- See Also:
-
PARAM_UPDATE_INTERVAL
- See Also:
-
params
-
-
Constructor Details
-
AbstractPushController
public AbstractPushController() -
AbstractPushController
-
AbstractPushController
-
-
Method Details
-
setUpdateInterval
public void setUpdateInterval(int milliseconds) Description copied from interface:PushControllerSets the update interval in milliseconds for this push controller.- Specified by:
setUpdateIntervalin interfacePushController- Parameters:
milliseconds- the delay between updates (or update requests) in milliseconds
-
getUpdateInterval
public int getUpdateInterval()Description copied from interface:PushControllerReturns the update interval in milliseconds for this push controller.- Specified by:
getUpdateIntervalin interfacePushController- Returns:
- the delay between updates (or update requests) in milliseconds
-
setComponent
Description copied from interface:PushControllerSets thePushComponentto be used by this push controller tocomponent.- Specified by:
setComponentin interfacePushController- Parameters:
component- the push component used by this push controller- See Also:
-
getComponent
Description copied from interface:PushControllerReturns this push controller'sPushComponent.- Specified by:
getComponentin interfacePushController- Returns:
- the push component used by this push controller
-
getDesktop
protected org.zkoss.zk.ui.Desktop getDesktop() -
setDone
public void setDone()Description copied from interface:PushControllerTells this push controller to stop processing server push events. Typically stops the thread gently within one polling cycle (seePushController.getUpdateInterval()).- Specified by:
setDonein interfacePushController- See Also:
-
isDone
protected boolean isDone() -
internalRun
protected void internalRun()- Overrides:
internalRunin classRegistrableThread
-
toString
-
addEvent
-
startController
public void startController()Description copied from interface:PushControllerStarts this push controller. Typically starts the push controller thread.- Specified by:
startControllerin interfacePushController- See Also:
-
getSession
-
getWebApplicationContext
protected org.springframework.web.context.WebApplicationContext getWebApplicationContext() throws IllegalStateException- Throws:
IllegalStateException
-
before
protected abstract void before() -
after
protected abstract void after() -
setParameters
- Specified by:
setParametersin interfacePushController
-
getParameters
- Specified by:
getParametersin interfacePushController
-
loadParameters
protected void loadParameters()
-