@Service public class MonitoringConsoleRuntimeImpl extends Object implements ConfigListener, ApplicationLifecycleInterceptor, EventListener, fish.payara.monitoring.adapt.MonitoringConsoleRuntime, fish.payara.monitoring.adapt.MonitoringConsoleWatchConfig, fish.payara.monitoring.adapt.MonitoringConsolePageConfig, fish.payara.monitoring.adapt.GroupDataRepository
MonitoringConsoleRuntime connects the Payara independent parts of the monitoring
console with the Payara server.
The most complicated aspect about the implementation is the way it is bootstrapped. By implementing
ApplicationLifecycleInterceptor it forces the creation of an instance of this Service even though it
is not otherwise referenced within the HK2 context. As this happens fairly early in the bootstrapping it then
registers itself as an EventListener so that it can run its actual init() bootstrapping as soon as
the EventTypes.SERVER_READY is received. This makes sure the bootstrapping of the console runtime does not
alter the order of services created by starting to collect data from services that implement
MonitoringDataSource or MonitoringWatchSource.EventListener.Event<T>| Constructor and Description |
|---|
MonitoringConsoleRuntimeImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(String name,
String watchJson) |
void |
after(ExtendedDeploymentContext.Phase phase,
ExtendedDeploymentContext context)
Provide call back after a certain phase of the application lifecycle
|
void |
before(ExtendedDeploymentContext.Phase phase,
ExtendedDeploymentContext context)
Provide call back before a certain phase of the application lifecycle
|
UnprocessedChangeEvents |
changed(PropertyChangeEvent[] events)
Notification that @Configured objects that were injected have changed
|
void |
disable(String name) |
void |
enable(String name) |
void |
event(EventListener.Event<?> event)
Process a Glassfish/Payara event
|
fish.payara.monitoring.adapt.GroupDataRepository |
getGroupData() |
String |
getPage(String name) |
fish.payara.monitoring.adapt.MonitoringConsolePageConfig |
getPageConfig() |
fish.payara.monitoring.adapt.MonitoringConsoleWatchConfig |
getWatchConfig() |
void |
init() |
boolean |
isDisabled(String name) |
Iterable<String> |
list() |
Iterable<String> |
listPages() |
void |
postConstruct() |
void |
putPage(String name,
String pageJson) |
boolean |
receive(Consumer<byte[]> receiver) |
void |
remove(String name) |
ScheduledFuture<?> |
scheduleAtFixedRate(Runnable task,
long initialDelay,
long period,
TimeUnit unit) |
Collection<fish.payara.monitoring.adapt.GroupData> |
selectAll(String source,
String group) |
boolean |
send(byte[] snapshot) |
@PostConstruct public void postConstruct()
public void event(EventListener.Event<?> event)
EventListenerevent in interface EventListenerpublic void init()
public final UnprocessedChangeEvents changed(PropertyChangeEvent[] events)
ConfigListenerchanged in interface ConfigListenerevents - list of changespublic ScheduledFuture<?> scheduleAtFixedRate(Runnable task, long initialDelay, long period, TimeUnit unit)
scheduleAtFixedRate in interface fish.payara.monitoring.adapt.MonitoringConsoleRuntimepublic boolean send(byte[] snapshot)
send in interface fish.payara.monitoring.adapt.MonitoringConsoleRuntimepublic boolean receive(Consumer<byte[]> receiver)
receive in interface fish.payara.monitoring.adapt.MonitoringConsoleRuntimepublic fish.payara.monitoring.adapt.MonitoringConsoleWatchConfig getWatchConfig()
getWatchConfig in interface fish.payara.monitoring.adapt.MonitoringConsoleRuntimepublic boolean isDisabled(String name)
isDisabled in interface fish.payara.monitoring.adapt.MonitoringConsoleWatchConfigpublic void disable(String name)
disable in interface fish.payara.monitoring.adapt.MonitoringConsoleWatchConfigpublic void enable(String name)
enable in interface fish.payara.monitoring.adapt.MonitoringConsoleWatchConfigpublic void add(String name, String watchJson)
add in interface fish.payara.monitoring.adapt.MonitoringConsoleWatchConfigpublic void remove(String name)
remove in interface fish.payara.monitoring.adapt.MonitoringConsoleWatchConfigpublic Iterable<String> list()
list in interface fish.payara.monitoring.adapt.MonitoringConsoleWatchConfigpublic fish.payara.monitoring.adapt.MonitoringConsolePageConfig getPageConfig()
getPageConfig in interface fish.payara.monitoring.adapt.MonitoringConsoleRuntimepublic String getPage(String name)
getPage in interface fish.payara.monitoring.adapt.MonitoringConsolePageConfigpublic void putPage(String name, String pageJson)
putPage in interface fish.payara.monitoring.adapt.MonitoringConsolePageConfigpublic Iterable<String> listPages()
listPages in interface fish.payara.monitoring.adapt.MonitoringConsolePageConfigpublic fish.payara.monitoring.adapt.GroupDataRepository getGroupData()
getGroupData in interface fish.payara.monitoring.adapt.MonitoringConsoleRuntimepublic Collection<fish.payara.monitoring.adapt.GroupData> selectAll(String source, String group)
selectAll in interface fish.payara.monitoring.adapt.GroupDataRepositorypublic void before(ExtendedDeploymentContext.Phase phase, ExtendedDeploymentContext context)
ApplicationLifecycleInterceptorbefore in interface ApplicationLifecycleInterceptorphase - the application lifecycle phase which the call back will
happen beforecontext - the deployment contextpublic void after(ExtendedDeploymentContext.Phase phase, ExtendedDeploymentContext context)
ApplicationLifecycleInterceptorafter in interface ApplicationLifecycleInterceptorphase - the application lifecycle phase which the call back will
happen aftercontext - the deployment contextCopyright © 2021. All rights reserved.