Class Edge
java.lang.Object
io.openems.backend.common.metadata.Edge
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Defines all Events an Edge can throw. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add User to UserList.getId()
Returns the Last-Message-Timestamp.getUser()
Get list of users.boolean
boolean
isOnline()
void
setComment
(String comment) void
Sets the Last-Message-Timestamp to now() and calls the setLastmessage-Listeners.void
setLastmessage
(ZonedDateTime timestamp) Sets the Last-Message-Timestamp and calls the setLastmessage-Listeners.void
setLastmessage
(ZonedDateTime timestamp, boolean callListeners) Sets the Last-Message-Timestamp.void
setOnline
(boolean isOnline) Marks this Edge as being online.void
setProducttype
(String producttype) Sets the Producttype and calls the SetProducttype-Listeners.void
setProducttype
(String producttype, boolean callListeners) Sets the Producttype.void
setVersion
(SemanticVersion version) Sets the version and calls the SetVersion-Listeners.void
setVersion
(SemanticVersion version, boolean callListeners) Sets the version.com.google.gson.JsonObject
Gets thisEdge
asJsonObject
.toString()
-
Constructor Details
-
Edge
-
-
Method Details
-
getId
-
getComment
-
setComment
-
toJsonObject
public com.google.gson.JsonObject toJsonObject()Gets thisEdge
asJsonObject
.- Returns:
- a
JsonObject
-
toString
-
isOnline
public boolean isOnline() -
isOffline
public boolean isOffline() -
setOnline
public void setOnline(boolean isOnline) Marks this Edge as being online. This is called by an event listener.- Parameters:
isOnline
- true if the Edge is online
-
setLastmessage
public void setLastmessage()Sets the Last-Message-Timestamp to now() and calls the setLastmessage-Listeners. -
setLastmessage
Sets the Last-Message-Timestamp and calls the setLastmessage-Listeners.- Parameters:
timestamp
- the Last-Message-Timestamp
-
setLastmessage
Sets the Last-Message-Timestamp.- Parameters:
timestamp
- the Last-Message-TimestampcallListeners
- whether to call the setLastmessage-Listeners
-
getLastmessage
Returns the Last-Message-Timestamp.- Returns:
- Last-Message-Timestamp in UTC Timezone
-
getVersion
-
setVersion
Sets the version and calls the SetVersion-Listeners.- Parameters:
version
- the version
-
setVersion
Sets the version.- Parameters:
version
- the versioncallListeners
- whether to call the SetVersion-Listeners
-
getProducttype
-
setProducttype
Sets the Producttype and calls the SetProducttype-Listeners.- Parameters:
producttype
- the Producttype
-
setProducttype
Sets the Producttype.- Parameters:
producttype
- the ProducttypecallListeners
- whether to call the SetProducttype-Listeners
-
addUser
Add User to UserList.- Parameters:
user
- to add
-
getUser
Get list of users.- Returns:
- user as List of EdgeUser
-