Package net.solarnetwork.ocpp.service
Interface ChargePointBroker
public interface ChargePointBroker
API for sending messages to Charge Points.
- Version:
- 1.0
- Author:
- matt
-
Method Summary
Modifier and TypeMethodDescriptionGet a complete set of Charge Point identifiers that are available, or otherwise know to this broker.booleanisChargePointAvailable(ChargePointIdentity identity) Test if a Charge Point is available, or otherwise known to this broker.booleanisMessageSupported(ActionMessage<?> message) Test if anActionMessageis supported by this broker.<T,R> boolean sendMessageToChargePoint(ActionMessage<T> message, ActionMessageResultHandler<T, R> resultHandler) Send anActionMessageto a Charge Point and provide the result to anActionMessageResultHandler.
-
Method Details
-
availableChargePointsIds
Set<ChargePointIdentity> availableChargePointsIds()Get a complete set of Charge Point identifiers that are available, or otherwise know to this broker.- Returns:
- the set of available charge point identifiers, never null
-
isChargePointAvailable
Test if a Charge Point is available, or otherwise known to this broker.- Parameters:
identity- the Charge Point ID to query- Returns:
- true if this broker is aware of the given
clientIdand should be able to send messages to it viasendMessageToChargePoint(ActionMessage, ActionMessageResultHandler)
-
isMessageSupported
Test if anActionMessageis supported by this broker.A message is supported if the message
Actionis supported by this broker and the messageclientIdis available.- Parameters:
message- the message to test- Returns:
- true if the message is supported
-
sendMessageToChargePoint
<T,R> boolean sendMessageToChargePoint(ActionMessage<T> message, ActionMessageResultHandler<T, R> resultHandler) Send anActionMessageto a Charge Point and provide the result to anActionMessageResultHandler.- Type Parameters:
T- the message typeR- the result type- Parameters:
message- the message to process, never nullresultHandler- the handler to provider the results to- Returns:
- true if the message client ID is known to the broker and the message has been or will be sent
-