Package io.openems.edge.bridge.http
Class BridgeHttpImpl
java.lang.Object
io.openems.edge.bridge.http.BridgeHttpImpl
- All Implemented Interfaces:
BridgeHttp
,BridgeHttpCycle
,BridgeHttpTime
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
Nested classes/interfaces inherited from interface io.openems.edge.bridge.http.api.BridgeHttp
BridgeHttp.Endpoint
Nested classes/interfaces inherited from interface io.openems.edge.bridge.http.api.BridgeHttpCycle
BridgeHttpCycle.CycleEndpoint
Nested classes/interfaces inherited from interface io.openems.edge.bridge.http.api.BridgeHttpTime
BridgeHttpTime.TimeEndpoint
-
Field Summary
Fields inherited from interface io.openems.edge.bridge.http.api.BridgeHttp
DEFAULT_CONNECT_TIMEOUT, DEFAULT_READ_TIMEOUT, EMPTY_ERROR_HANDLER
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
activate()
Activate method.void
Deactivate method.request
(BridgeHttp.Endpoint endpoint) Fetches the url once.void
subscribeCycle
(BridgeHttpCycle.CycleEndpoint endpoint) Subscribes to one http endpoint.void
subscribeTime
(BridgeHttpTime.TimeEndpoint endpoint) Subscribes to anBridgeHttpTime.TimeEndpoint
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.openems.edge.bridge.http.api.BridgeHttp
delete, deleteJson, get, getJson, post, postJson, put, putJson, requestJson
Methods inherited from interface io.openems.edge.bridge.http.api.BridgeHttpCycle
subscribeCycle, subscribeCycle, subscribeCycle, subscribeEveryCycle, subscribeEveryCycle, subscribeEveryCycle, subscribeJsonCycle, subscribeJsonCycle, subscribeJsonEveryCycle, subscribeJsonEveryCycle
Methods inherited from interface io.openems.edge.bridge.http.api.BridgeHttpTime
subscribeJsonTime, subscribeJsonTime, subscribeTime, subscribeTime, subscribeTime, subscribeTime, subscribeTime
-
Constructor Details
-
BridgeHttpImpl
public BridgeHttpImpl()
-
-
Method Details
-
activate
public void activate()Activate method. -
deactivate
public void deactivate()Deactivate method. -
subscribeCycle
Description copied from interface:BridgeHttpCycle
Subscribes to one http endpoint.- Specified by:
subscribeCycle
in interfaceBridgeHttpCycle
- Parameters:
endpoint
- theBridgeHttpCycle.CycleEndpoint
configuration
-
subscribeTime
Description copied from interface:BridgeHttpTime
Subscribes to anBridgeHttpTime.TimeEndpoint
. TheBridgeHttpTime.TimeEndpoint.endpoint
gets fetched based on the delayed time provided by theBridgeHttpTime.TimeEndpoint.delayTimeProvider
. After the endpoint gets fetched either theBridgeHttpTime.TimeEndpoint.onResult
or theBridgeHttpTime.TimeEndpoint.onError
gets executed depending on the result.- Specified by:
subscribeTime
in interfaceBridgeHttpTime
- Parameters:
endpoint
- theBridgeHttpTime.TimeEndpoint
to add a subscription
-
request
Description copied from interface:BridgeHttp
Fetches the url once.- Specified by:
request
in interfaceBridgeHttp
- Parameters:
endpoint
- theBridgeHttp.Endpoint
to fetch- Returns:
- the result response future
-
getCycleEndpoints
-
getTimeEndpoints
-