Package com.framed.core
Class Service
java.lang.Object
com.framed.core.Service
- Direct Known Subclasses:
Actor,Dispatcher,Parser,Protocol,Writer
An abstract base class for application services that provides access to an
EventBus
for inter-component communication / services and a Logger for logging.
Subclasses can use the event bus to send or receive messages and the logger for
diagnostic output. This class also provides a default stop() method that can
be overridden to implement custom shutdown logic.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
eventBus
The event bus used for communication between components. -
logger
Logger instance for this service, initialized with the class name. -
formatter
-
-
Constructor Details
-
Service
Creates a new service instance with the specified event bus.- Parameters:
eventBus- the event bus used for communication
-
-
Method Details
-
stop
public void stop()Stops the service.By default, this method logs a message indicating that no stop logic is implemented. Subclasses should override this method to provide custom shutdown behavior when necessary.
-