Package net.solarnetwork.ocpp.domain
Class PendingActionMessage
java.lang.Object
net.solarnetwork.ocpp.domain.PendingActionMessage
A "pending" action message, which is waiting for a result message to be
received.
- Version:
- 1.0
- Author:
- matt
-
Constructor Summary
ConstructorsConstructorDescriptionPendingActionMessage(ActionMessage<Object> message) Constructor for inbound message response.PendingActionMessage(ActionMessage<Object> message, ActionMessageResultHandler<Object, Object> handler) Constructor for inbound message response. -
Method Summary
Modifier and TypeMethodDescriptionbooleanCall to process the pending action.longgetDate()Get the message date.Get the result handler.Get the message.booleanGet the outbound flag.
-
Constructor Details
-
PendingActionMessage
public PendingActionMessage(ActionMessage<Object> message, ActionMessageResultHandler<Object, Object> handler) Constructor for inbound message response.- Parameters:
message- the messagehandler- the handler- Throws:
IllegalArgumentException- ifmessageorhandlerare null
-
PendingActionMessage
Constructor for inbound message response.- Parameters:
message- the message- Throws:
IllegalArgumentException- ifmessageis null
-
-
Method Details
-
getDate
public long getDate()Get the message date.- Returns:
- the date
-
isOutbound
public boolean isOutbound()Get the outbound flag.- Returns:
- the outbound flag
-
getMessage
Get the message.- Returns:
- the message; never null
-
getHandler
Get the result handler.- Returns:
- the handler; never null
-
doProcess
public boolean doProcess()Call to process the pending action.- Returns:
- true if the action can be processed, false if this method has already been called
-