Package io.openems.edge.core.host
Class HostImpl
- java.lang.Object
-
- io.openems.edge.common.component.AbstractOpenemsComponent
-
- io.openems.edge.core.host.HostImpl
-
- All Implemented Interfaces:
OpenemsComponent
,Host
,JsonApi
public class HostImpl extends AbstractOpenemsComponent implements Host, OpenemsComponent, JsonApi
The Host-Component handles access to the host computer and operating system.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.openems.edge.common.host.Host
Host.ChannelId
-
Nested classes/interfaces inherited from interface io.openems.edge.common.component.OpenemsComponent
OpenemsComponent.ChannelId
-
-
Field Summary
Fields Modifier and Type Field Description protected org.osgi.service.cm.ConfigurationAdmin
cm
protected io.openems.edge.core.host.Config
config
protected OperatingSystem
operatingSystem
-
Fields inherited from interface io.openems.edge.common.host.Host
SINGLETON_COMPONENT_ID, SINGLETON_SERVICE_PID
-
-
Constructor Summary
Constructors Constructor Description HostImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
deactivate()
Handles @Deactivate of implementations.java.util.concurrent.CompletableFuture<? extends JsonrpcResponseSuccess>
handleJsonrpcRequest(User user, JsonrpcRequest request)
Handles a JSON-RPC Request.protected void
logError(org.slf4j.Logger log, java.lang.String message)
Log an error message including the Component ID.protected void
logInfo(org.slf4j.Logger log, java.lang.String message)
Log an info message including the Component ID.protected void
logWarn(org.slf4j.Logger log, java.lang.String message)
Log a warn message including the Component ID.-
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.common.host.Host
_setDiskIsFull, _setHostname, getDiskIsFull, getDiskIsFullChannel, getHostname, getHostnameChannel
-
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 Detail
-
cm
protected org.osgi.service.cm.ConfigurationAdmin cm
-
operatingSystem
protected final OperatingSystem operatingSystem
-
config
protected io.openems.edge.core.host.Config config
-
-
Method Detail
-
deactivate
protected void deactivate()
Description copied from class:AbstractOpenemsComponent
Handles @Deactivate of implementations. Prints log output.- Overrides:
deactivate
in classAbstractOpenemsComponent
-
handleJsonrpcRequest
public java.util.concurrent.CompletableFuture<? extends JsonrpcResponseSuccess> handleJsonrpcRequest(User user, JsonrpcRequest request) throws OpenemsError.OpenemsNamedException
Description copied from interface:JsonApi
Handles a JSON-RPC Request.- Specified by:
handleJsonrpcRequest
in interfaceJsonApi
- Parameters:
user
- the authenticatedUser
request
- the JSON-RPC Request- Returns:
- a Future JSON-RPC Success Response; null response results in a OpenemsError.JSONRPC_UNHANDLED_METHOD
- Throws:
OpenemsError.OpenemsNamedException
- on error
-
logInfo
protected void logInfo(org.slf4j.Logger log, java.lang.String message)
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
protected void logWarn(org.slf4j.Logger log, java.lang.String message)
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
protected void logError(org.slf4j.Logger log, java.lang.String message)
Description copied from class:AbstractOpenemsComponent
Log an error message including the Component ID.- Overrides:
logError
in classAbstractOpenemsComponent
- Parameters:
log
- the Logger instancemessage
- the message
-
-