org.flexiblepower.efi
public abstract class AbstractUncontrolledDriver<RS extends ResourceState> extends java.lang.Object implements UncontrolledResourceManager
Modifier and Type | Field and Description |
---|---|
protected org.slf4j.Logger |
logger
The logger that should be used by any subclass.
|
Constructor and Description |
---|
AbstractUncontrolledDriver()
Creates a new instance for the specific driver class type and the control space class.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
isConnectedWithResourceController()
Indicate if this driver is currently connected to a
ControllerManager . |
org.flexiblepower.messaging.MessageHandler |
onConnect(org.flexiblepower.messaging.Connection connection) |
protected abstract void |
receivedAllocation(ResourceMessage message)
This method is called when a message has been received from the controller.
|
protected void |
sendMessage(ResourceMessage message)
Sends a message to the attached controller.
|
protected abstract UncontrolledRegistration |
startRegistration()
This method is called when it is connected to the controller and the registration object should be sent.
|
protected final org.slf4j.Logger logger
public AbstractUncontrolledDriver()
protected abstract UncontrolledRegistration startRegistration()
UncontrolledRegistration
that will be sent to the controller.protected abstract void receivedAllocation(ResourceMessage message)
Allocation
object, but could also be of another type, depending on the used message type.message
- The received messagepublic org.flexiblepower.messaging.MessageHandler onConnect(org.flexiblepower.messaging.Connection connection)
onConnect
in interface org.flexiblepower.messaging.Endpoint
protected final boolean isConnectedWithResourceController()
ControllerManager
.ControllerManager
protected void sendMessage(ResourceMessage message)
message
- The message that is to be sent to the controller.