Package org.opennms.minion.status
Class AggregateMinionStatus
- java.lang.Object
-
- org.opennms.minion.status.AggregateMinionStatus
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<AggregateMinionStatus>
,MinionStatus
public class AggregateMinionStatus extends java.lang.Object implements MinionStatus, java.lang.Comparable<AggregateMinionStatus>, java.io.Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.opennms.minion.status.MinionStatus
MinionStatus.State
-
-
Field Summary
-
Fields inherited from interface org.opennms.minion.status.MinionStatus
DOWN, UP
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AggregateMinionStatus(MinionServiceStatus heartbeat, MinionServiceStatus rpc)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(AggregateMinionStatus o)
static AggregateMinionStatus
create(MinionServiceStatus heartbeat, MinionServiceStatus rpc)
Create a new aggregate status, given existing heartbeat and RPC statuses.static AggregateMinionStatus
down()
Create a new aggregate status without known state, assumed to be down.boolean
equals(java.lang.Object o)
MinionServiceStatus
getHeartbeatStatus()
MinionServiceStatus
getRpcStatus()
MinionStatus.State
getState()
AggregateMinionStatus
heartbeatDown()
AggregateMinionStatus
heartbeatUp()
boolean
isUp()
AggregateMinionStatus
rpcDown()
AggregateMinionStatus
rpcUp()
java.lang.String
toString()
static AggregateMinionStatus
up()
Create a new aggregate status assumed to be up.
-
-
-
Constructor Detail
-
AggregateMinionStatus
protected AggregateMinionStatus(MinionServiceStatus heartbeat, MinionServiceStatus rpc)
-
-
Method Detail
-
create
public static AggregateMinionStatus create(MinionServiceStatus heartbeat, MinionServiceStatus rpc)
Create a new aggregate status, given existing heartbeat and RPC statuses.- Parameters:
heartbeat
- the heartbeat statusrpc
- the RPC status- Returns:
- an aggregate status
-
down
public static AggregateMinionStatus down()
Create a new aggregate status without known state, assumed to be down.- Returns:
- a down aggregate status
-
up
public static AggregateMinionStatus up()
Create a new aggregate status assumed to be up.- Returns:
- an up aggregate status
-
getHeartbeatStatus
public MinionServiceStatus getHeartbeatStatus()
-
getRpcStatus
public MinionServiceStatus getRpcStatus()
-
getState
public MinionStatus.State getState()
- Specified by:
getState
in interfaceMinionStatus
-
isUp
public boolean isUp()
- Specified by:
isUp
in interfaceMinionStatus
-
heartbeatDown
public AggregateMinionStatus heartbeatDown()
-
heartbeatUp
public AggregateMinionStatus heartbeatUp()
-
rpcDown
public AggregateMinionStatus rpcDown()
-
rpcUp
public AggregateMinionStatus rpcUp()
-
compareTo
public int compareTo(AggregateMinionStatus o)
- Specified by:
compareTo
in interfacejava.lang.Comparable<AggregateMinionStatus>
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-