public abstract class VmListenerBackend extends BaseBackend implements VmStatusListener
Backend (via BaseBackend) for those
that need to attach VmUpdateListener in response to starting and stopping of JVMs on a
host.VmStatusListener,
Backend,
BaseBackendVmStatusListener.StatusORDER_CPU_GROUP, ORDER_DEFAULT_GROUP, ORDER_IO_GROUP, ORDER_MEMORY_GROUP, ORDER_NETWORK_GROUP, ORDER_THREAD_GROUP, ORDER_USER_GROUP| Constructor and Description |
|---|
VmListenerBackend(String backendName,
String description,
String vendor,
String version,
boolean observeNewJvm,
VmStatusListenerRegistrar registrar) |
VmListenerBackend(String backendName,
String description,
String vendor,
String version,
VmStatusListenerRegistrar registrar) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
activate()
Activate the
Backend. |
protected abstract VmUpdateListener |
createVmListener(int pid)
Creates a new
VmUpdateListener for the virtual machine
specified by the pid. |
boolean |
deactivate()
Deactivate the
Backend. |
boolean |
isActive() |
void |
vmStatusChanged(VmStatusListener.Status newStatus,
int pid) |
equals, getDescription, getName, getObserveNewJvm, getVendor, getVersion, hashCode, setObserveNewJvm, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetOrderValuepublic VmListenerBackend(String backendName, String description, String vendor, String version, VmStatusListenerRegistrar registrar)
public VmListenerBackend(String backendName, String description, String vendor, String version, boolean observeNewJvm, VmStatusListenerRegistrar registrar)
public boolean activate()
Backend. Based on the current configuration,
begin pushing data to the Storage layer.
If the Backend is already active, this method should have no
effect.
Backend is
registered.
Registers a VmUpdateListener to begin receiving VM lifecycle events.
Subclasses should call super.activate() when overriding this method.
public boolean deactivate()
Backend. The backend should release any
resources that were obtained as a direct result of a call to
Backend.activate(). If the Backend is not active, this
method should have no effect
Backend is
deregistered.
Unregisters the VmUpdateListener to stop receiving VM lifecycle events.
Subclasses should call super.deactivate() when overriding this method.
deactivate in interface Backendtrue if the backend was successfully deactivated or
already inactive. false if the backend is still active.public boolean isActive()
public void vmStatusChanged(VmStatusListener.Status newStatus, int pid)
vmStatusChanged in interface VmStatusListenerprotected abstract VmUpdateListener createVmListener(int pid)
VmUpdateListener for the virtual machine
specified by the pid. This method is called when a new
JVM is started or for JVMs already active when this Backend
was activated.pid - the process ID of the JVMCopyright © 2013. All Rights Reserved.