public class ClusterRepoItem extends RepositoryItemAbstract
Modifier and Type | Field and Description |
---|---|
static String |
CPU_USAGE_ATTR
Field description
|
static String |
CPU_USAGE_LABEL
Field description
|
static String |
HOSTNAME_ATTR
Field description
|
static String |
HOSTNAME_LABEL
Field description
|
static String |
LAST_UPDATE_ATTR
Field description
|
static String |
LAST_UPDATE_LABEL
Field description
|
static String |
MEM_USAGE_ATTR
Field description
|
static String |
MEM_USAGE_LABEL
Field description
|
static String |
PASSWORD_ATTR
Field description
|
static String |
PASSWORD_LABEL
Field description
|
static String |
PASSWORD_PROP_VAL
Field description
|
static String |
PORT_NO_ATTR
Field description
|
static String |
PORT_NO_LABEL
Field description
|
static int |
PORT_NO_PROP_VAL
Field description
|
static String |
REPO_ITEM_ELEM_NAME
Field description
|
ADMINS_ATT, ADMINS_LABEL, OWNER_ATT, OWNER_LABEL
Constructor and Description |
---|
ClusterRepoItem() |
Modifier and Type | Method and Description |
---|---|
void |
addCommandFields(Packet packet)
The method is used for handling ad-hoc commands.
|
float |
getCpuUsage()
Method description
|
String |
getElemName()
Method description
|
String |
getHostname()
Method description
|
String |
getKey()
Returns a unique key for the item in the repository.
|
long |
getLastUpdate()
Method description
|
float |
getMemUsage()
Method description
|
String |
getPassword()
Method description
|
int |
getPortNo()
Method description
|
void |
initFromCommand(Packet packet)
The method used for handling ad-hoc commands.
|
void |
initFromElement(tigase.xml.Element elem)
The item can be also initialized from a more complex repositories: XML repository
or SQL database.
|
void |
initFromPropertyString(String propString)
The item can be initialized based on the data loaded from a configuration file.
|
protected void |
setCpuUsage(float cpuUsage)
Method description
|
protected void |
setHostname(String hostname)
Method description
|
protected void |
setLastUpdate(long update)
Method description
|
protected void |
setMemUsage(float memUsage)
Method description
|
protected void |
setPassword(String password)
Method description
|
protected void |
setPort(int port)
Method description
|
tigase.xml.Element |
toElement()
Item data can be stored in a more complex form than a simple property string.
|
String |
toPropertyString()
The item can be initialized based on the data loaded from a configuration file.
|
String |
toString() |
public static final String CPU_USAGE_ATTR
public static final String CPU_USAGE_LABEL
public static final String HOSTNAME_ATTR
public static final String HOSTNAME_LABEL
public static final String LAST_UPDATE_ATTR
public static final String LAST_UPDATE_LABEL
public static final String MEM_USAGE_ATTR
public static final String MEM_USAGE_LABEL
public static final String PASSWORD_ATTR
public static final String PASSWORD_LABEL
public static final String PASSWORD_PROP_VAL
public static final String PORT_NO_ATTR
public static final String PORT_NO_LABEL
public static final int PORT_NO_PROP_VAL
public static final String REPO_ITEM_ELEM_NAME
public void addCommandFields(Packet packet)
RepositoryItem
addCommandFields
in interface RepositoryItem
addCommandFields
in class RepositoryItemAbstract
packet
- with empty ad-hoc command to fill with fieldspublic void initFromCommand(Packet packet)
RepositoryItem
initFromCommand
in interface RepositoryItem
initFromCommand
in class RepositoryItemAbstract
packet
- with ad-hoc command filled by the user.public void initFromElement(tigase.xml.Element elem)
RepositoryItem
initFromElement
in interface RepositoryItem
initFromElement
in class RepositoryItemAbstract
elem
- XML Element with all the item initialization data.public void initFromPropertyString(String propString)
RepositoryItem
propString
- is a property string to initialize the RepositoryItem.public tigase.xml.Element toElement()
RepositoryItem
toElement
in interface RepositoryItem
toElement
in class RepositoryItemAbstract
public String toPropertyString()
RepositoryItem
public float getCpuUsage()
public String getElemName()
RepositoryItemAbstract
getElemName
in class RepositoryItemAbstract
public String getHostname()
public String getKey()
RepositoryItem
public long getLastUpdate()
public float getMemUsage()
public String getPassword()
public int getPortNo()
protected void setCpuUsage(float cpuUsage)
cpuUsage
- protected void setHostname(String hostname)
hostname
- protected void setLastUpdate(long update)
update
- protected void setMemUsage(float memUsage)
memUsage
- protected void setPassword(String password)
password
- protected void setPort(int port)
port
- Copyright © 2015 "Tigase, Inc.". All rights reserved.