Package com.biglybt.core
Class CoreLifecycleAdapter
- java.lang.Object
-
- com.biglybt.core.CoreLifecycleAdapter
-
- All Implemented Interfaces:
CoreLifecycleListener
public class CoreLifecycleAdapter extends java.lang.Object implements CoreLifecycleListener
-
-
Constructor Summary
Constructors Constructor Description CoreLifecycleAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
componentCreated(Core core, CoreComponent component)
boolean
requiresPluginInitCompleteBeforeStartedEvent()
hack - original semantics of the "started" event was that all plugins init complete However, some can take a long time (and even block if attempting to acquire, say, public IP address and version server is down...) so added this flag to allow listeners to indicate that they're happy to be "started" before plugin init completeboolean
restartRequested(Core core)
void
started(Core core)
void
stopped(Core core)
void
stopping(Core core)
boolean
stopRequested(Core core)
return true if the request has been accepted (and hence the listener will arrange for a stop to occurboolean
syncInvokeRequired()
Some listeners must be invoked on the same thread that initiates a core closedown.
-
-
-
Method Detail
-
componentCreated
public void componentCreated(Core core, CoreComponent component)
- Specified by:
componentCreated
in interfaceCoreLifecycleListener
-
started
public void started(Core core)
- Specified by:
started
in interfaceCoreLifecycleListener
-
stopping
public void stopping(Core core)
- Specified by:
stopping
in interfaceCoreLifecycleListener
-
stopped
public void stopped(Core core)
- Specified by:
stopped
in interfaceCoreLifecycleListener
-
stopRequested
public boolean stopRequested(Core core) throws CoreException
Description copied from interface:CoreLifecycleListener
return true if the request has been accepted (and hence the listener will arrange for a stop to occur- Specified by:
stopRequested
in interfaceCoreLifecycleListener
- Returns:
- Throws:
CoreException
-
restartRequested
public boolean restartRequested(Core core) throws CoreException
- Specified by:
restartRequested
in interfaceCoreLifecycleListener
- Throws:
CoreException
-
syncInvokeRequired
public boolean syncInvokeRequired()
Description copied from interface:CoreLifecycleListener
Some listeners must be invoked on the same thread that initiates a core closedown. In particular the show-alerts-raised-during-closedown logic requires that it is invoked on the com.biglybt.ui.swt thread that initiated the closedown.- Specified by:
syncInvokeRequired
in interfaceCoreLifecycleListener
- Returns:
-
requiresPluginInitCompleteBeforeStartedEvent
public boolean requiresPluginInitCompleteBeforeStartedEvent()
Description copied from interface:CoreLifecycleListener
hack - original semantics of the "started" event was that all plugins init complete However, some can take a long time (and even block if attempting to acquire, say, public IP address and version server is down...) so added this flag to allow listeners to indicate that they're happy to be "started" before plugin init complete- Specified by:
requiresPluginInitCompleteBeforeStartedEvent
in interfaceCoreLifecycleListener
- Returns:
-
-