Package io.vertigo.commons.app
Class AppNode
- java.lang.Object
-
- io.vertigo.commons.app.AppNode
-
public final class AppNode extends Object
A Node in a vertigo node. A node has : - an id - a status - the timestamp of the last touch - the timestamp of the startup of the app - the skills of the node - an optional endPoint to reach the node- Author:
- mlaroche
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAppName()The name of the appOptional<String>getEndPoint()The optional endPoint of the nodeStringgetId()The id of the nodeStringgetLastStatus()The last status of the nodeInstantgetLastTouch()The timestamp of the last touch of the nodeStringgetProtocol()The protocol of the endpoint (if specified)List<String>getSkills()The skills of the node (for example editing)longgetStartDate()The start date of the node
-
-
-
Constructor Detail
-
AppNode
public AppNode(String id, String appName, String lastStatus, Instant lastTouch, Instant startDate, Optional<String> endPointOpt, List<String> skills)
Constructor.- Parameters:
id- id of the node (must be unique in an entire app)appName- name of the node the node is inlastStatus- last status of the node (OK, KO, etc)lastTouch- the time of the last info about this nodestartDate- the start date of the nodeendPointOpt- an optional endpoint to reach this nodeskills- the list of capabilities of the node
-
-
Method Detail
-
getId
public String getId()
The id of the node- Returns:
- the id
-
getAppName
public String getAppName()
The name of the app- Returns:
- the node name
-
getStartDate
public long getStartDate()
The start date of the node- Returns:
- epochMillis
-
getEndPoint
public Optional<String> getEndPoint()
The optional endPoint of the node- Returns:
- the endPoint
-
getProtocol
public String getProtocol()
The protocol of the endpoint (if specified)- Returns:
- the protocol
-
getSkills
public List<String> getSkills()
The skills of the node (for example editing)- Returns:
- the skills of the node
-
getLastStatus
public String getLastStatus()
The last status of the node- Returns:
- the status of the node
-
getLastTouch
public Instant getLastTouch()
The timestamp of the last touch of the node- Returns:
- the timestamp of the last touch of the node
-
-