public class AbstractPluginStateComponent extends AbstractPluginComponent implements PluginStateComponent
AbstractPluginStateComponent
provides an abstract base class for implementing
PluginStateComponent
s.Modifier | Constructor and Description |
---|---|
protected |
AbstractPluginStateComponent() |
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Invoked to set the state of
PluginStateComponent to be destroyed. |
LifecycleState |
getLifecycleState()
Gets the current
LifecycleState of this PluginStateComponent . |
Params |
getParams() |
PluginState |
getState()
Gets the current state of this
PluginStateComponent . |
boolean |
isDestroyed()
Tests if destroyed.
|
boolean |
isPaused()
Tests if paused.
|
boolean |
isRestarted()
Tests if restarted.
|
boolean |
isResumed()
Tests if paused.
|
boolean |
isStarted()
Tests if started.
|
boolean |
isStopped()
Tests if stopped.
|
protected void |
onCreate(Params params) |
protected void |
onDestroy() |
protected void |
onPause() |
protected void |
onRestart() |
protected void |
onResume() |
protected void |
onStart() |
protected void |
onStop() |
void |
pause()
Invoked to pause this
PluginStateComponent . |
void |
restart()
Invoked to restart this
PluginStateComponent . |
void |
resume()
Invoked to resume this
PluginStateComponent . |
void |
start()
Invoked to start this
PluginStateComponent without parameters. |
void |
start(Params params)
Invoked to start the
PluginStateComponent using the given parameters. |
void |
stop()
Invoked to set the state of
PluginStateComponent to be stopped. |
onPlugged, onPluginPlugged, onPluginUnplugged, onUnplugged
getScope, setScope
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
onPlugged, onPluginPlugged, onPluginUnplugged, onUnplugged
protected Params params
public LifecycleState getLifecycleState()
PluginStateComponent
LifecycleState
of this PluginStateComponent
.getLifecycleState
in interface PluginStateComponent
LifecycleState
.public Params getParams()
public void pause()
PluginStateComponent
PluginStateComponent
.pause
in interface PluginStateComponent
public void resume()
PluginStateComponent
PluginStateComponent
.resume
in interface PluginStateComponent
public void restart()
PluginStateComponent
PluginStateComponent
.restart
in interface PluginStateComponent
public final void start()
PluginStateComponent
PluginStateComponent
without parameters.start
in interface PluginStateComponent
public final void start(Params params)
PluginStateComponent
PluginStateComponent
using the given parameters.start
in interface PluginStateComponent
params
- A Params
. May not be null
.public void stop()
PluginStateComponent
PluginStateComponent
to be stopped. A stopped
PluginStateComponent
is unplugged from PluginBus
.stop
in interface PluginStateComponent
public void destroy()
PluginStateComponent
PluginStateComponent
to be destroyed. This method is
automatically invoked for a stopped PluginStateComponent
.destroy
in interface PluginStateComponent
public PluginState getState()
PluginStateComponent
PluginStateComponent
.getState
in interface PluginStateComponent
PluginState
.protected void onCreate(Params params)
protected void onStart()
protected void onRestart()
protected void onResume()
protected void onPause()
protected void onStop()
protected void onDestroy()
public boolean isPaused()
PluginStateComponent
isPaused
in interface PluginStateComponent
boolean
.public boolean isRestarted()
PluginStateComponent
isRestarted
in interface PluginStateComponent
boolean
.public boolean isResumed()
PluginStateComponent
isResumed
in interface PluginStateComponent
boolean
.public boolean isStarted()
PluginStateComponent
isStarted
in interface PluginStateComponent
boolean
.public boolean isStopped()
PluginStateComponent
isStopped
in interface PluginStateComponent
boolean
.public boolean isDestroyed()
PluginStateComponent
isDestroyed
in interface PluginStateComponent
boolean
.