Class ControllerApiWebsocketImpl
java.lang.Object
io.openems.edge.common.component.AbstractOpenemsComponent
io.openems.edge.controller.api.websocket.ControllerApiWebsocketImpl
- All Implemented Interfaces:
OpenemsComponent
,Controller
,ControllerApiWebsocket
,org.osgi.service.event.EventHandler
public class ControllerApiWebsocketImpl
extends AbstractOpenemsComponent
implements ControllerApiWebsocket, Controller, OpenemsComponent, org.osgi.service.event.EventHandler
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.openems.edge.controller.api.Controller
Controller.ChannelId
Nested classes/interfaces inherited from interface io.openems.edge.controller.api.websocket.ControllerApiWebsocket
ControllerApiWebsocket.ChannelId
Nested classes/interfaces inherited from interface io.openems.edge.common.component.OpenemsComponent
OpenemsComponent.ChannelId
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ApiWorker
protected ComponentManager
protected OnRequest
protected OnRequest.Factory
protected WebsocketServer
protected UserService
Fields inherited from interface io.openems.edge.controller.api.websocket.ControllerApiWebsocket
DEFAULT_PORT, EDGE_COMMENT, EDGE_ID, EDGE_PRODUCT_TYPE, SUM_STATE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Handles @Deactivate of implementations.void
handleEvent
(org.osgi.service.event.Event event) protected void
Log an error message including the Component ID.protected final void
Log an info message including the Component ID.protected final void
Log a warn message including the Component ID.void
run()
Executes the Controller logic.Methods inherited from class io.openems.edge.common.component.AbstractOpenemsComponent
_channel, activate, activate, addChannel, addChannels, addChannels, alias, channels, getComponentContext, id, isEnabled, logDebug, modified, removeChannel
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.controller.api.Controller
_setRunFailed, getRunFailed, getRunFailedChannel
Methods inherited from interface io.openems.edge.common.component.OpenemsComponent
_channel, _getChannelAs, alias, channel, channel, channels, debugLog, getComponentContext, getState, getStateChannel, hasFaults, id, isEnabled, serviceFactoryPid, servicePid
-
Field Details
-
apiWorker
-
componentManager
-
userService
-
server
-
onRequestFactory
-
onRequest
-
-
Constructor Details
-
ControllerApiWebsocketImpl
public ControllerApiWebsocketImpl()
-
-
Method Details
-
deactivate
protected void deactivate()Description copied from class:AbstractOpenemsComponent
Handles @Deactivate of implementations. Prints log output.- Overrides:
deactivate
in classAbstractOpenemsComponent
-
run
Description copied from interface:Controller
Executes the Controller logic.- Specified by:
run
in interfaceController
- Throws:
OpenemsError.OpenemsNamedException
- on error
-
logInfo
Description copied from class:AbstractOpenemsComponent
Log an info message including the Component ID.- Overrides:
logInfo
in classAbstractOpenemsComponent
- Parameters:
log
- the Logger instancemessage
- the message
-
logWarn
Description copied from class:AbstractOpenemsComponent
Log a warn message including the Component ID.- Overrides:
logWarn
in classAbstractOpenemsComponent
- Parameters:
log
- the Logger instancemessage
- the message
-
logError
Description copied from class:AbstractOpenemsComponent
Log an error message including the Component ID.- Overrides:
logError
in classAbstractOpenemsComponent
- Parameters:
log
- the Logger instancemessage
- the message
-
handleEvent
public void handleEvent(org.osgi.service.event.Event event) - Specified by:
handleEvent
in interfaceorg.osgi.service.event.EventHandler
-