Package org.jboss.as.domain.http.server
Class ConsoleAvailabilityService
- java.lang.Object
-
- org.jboss.as.domain.http.server.ConsoleAvailabilityService
-
- All Implemented Interfaces:
PropertyChangeListener,EventListener,ConsoleAvailability,org.jboss.msc.Service
public final class ConsoleAvailabilityService extends Object implements org.jboss.msc.Service, ConsoleAvailability, PropertyChangeListener
Exposes aConsoleAvailabilityto check the availability of the web console.By default the console is not available, this service listen to changes in the process controller state. The web console is available as soon as the process controller transitions to running. This service allows to make the console available even before than the process controller is running by using
setAvailable()method.- Author:
- , Yeray Borges
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceConsoleAvailabilityService.LogAdminConsole
-
Field Summary
-
Fields inherited from interface org.jboss.as.domain.http.server.ConsoleAvailability
CONSOLE_AVAILABILITY_CAPABILITY
-
-
Constructor Summary
Constructors Constructor Description ConsoleAvailabilityService(Consumer<ConsoleAvailability> serviceConsumer, Supplier<ProcessStateNotifier> notifier, ConsoleAvailabilityService.LogAdminConsole logMessageAction)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidaddService(org.jboss.msc.service.ServiceTarget serviceTarget, ConsoleAvailabilityService.LogAdminConsole logMessageAction)booleanisAvailable()Gets the availability of the web console.voidpropertyChange(PropertyChangeEvent evt)voidsetAvailable()Tries to make the console available.voidstart(org.jboss.msc.service.StartContext context)voidstop(org.jboss.msc.service.StopContext context)
-
-
-
Constructor Detail
-
ConsoleAvailabilityService
public ConsoleAvailabilityService(Consumer<ConsoleAvailability> serviceConsumer, Supplier<ProcessStateNotifier> notifier, ConsoleAvailabilityService.LogAdminConsole logMessageAction)
-
-
Method Detail
-
addService
public static void addService(org.jboss.msc.service.ServiceTarget serviceTarget, ConsoleAvailabilityService.LogAdminConsole logMessageAction)
-
start
public void start(org.jboss.msc.service.StartContext context) throws org.jboss.msc.service.StartException- Specified by:
startin interfaceorg.jboss.msc.Service- Throws:
org.jboss.msc.service.StartException
-
stop
public void stop(org.jboss.msc.service.StopContext context)
- Specified by:
stopin interfaceorg.jboss.msc.Service
-
isAvailable
public boolean isAvailable()
Gets the availability of the web console.- Specified by:
isAvailablein interfaceConsoleAvailability- Returns:
- Whether the console is available at this moment.
-
setAvailable
public void setAvailable()
Tries to make the console available. The console will be available only if the process controller is not stopping.- Specified by:
setAvailablein interfaceConsoleAvailability
-
propertyChange
public void propertyChange(PropertyChangeEvent evt)
- Specified by:
propertyChangein interfacePropertyChangeListener
-
-