@Service(name="example-service") @RunLevel(value=10) public class ExampleService extends Object implements EventListener, MessageReceiver, ConfigListener
EventListener.Event<T>
Constructor and Description |
---|
ExampleService() |
Modifier and Type | Method and Description |
---|---|
void |
bootService()
This method is called after the service instance has been created
|
UnprocessedChangeEvents |
changed(PropertyChangeEvent[] pces)
This is the required method for the ConfigListener it is called
if our configuration is changed.
|
void |
doSomethingDirectly(String message)
Example method to be used by the instance targeted asadmin command
to interact with the service directly
|
void |
event(EventListener.Event event)
This is the required method for the EventListener interface for server wide messages
handling these events means your service can take action depending on things
happening within the server
|
void |
receiveMessage(ClusterMessage message)
This is the required method for the Payara Specific cluster wide event bus
|
void |
reconfigure() |
@PostConstruct public void bootService()
public void event(EventListener.Event event)
event
in interface EventListener
event
- public void receiveMessage(ClusterMessage message)
receiveMessage
in interface MessageReceiver
message
- public UnprocessedChangeEvents changed(PropertyChangeEvent[] pces)
changed
in interface ConfigListener
pces
- isCurrentInstanceMatchTarget
public void reconfigure()
public void doSomethingDirectly(String message)
Copyright © 2018. All rights reserved.