|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.ic.doc.automed.p2p.AppToolKit.NodeConfig
public static class AppToolKit.NodeConfig
Inner class to define a server configuration
Constructor Summary | |
---|---|
AppToolKit.NodeConfig(java.lang.String name,
java.util.Properties props)
Alternatively, we can create a config object with loads of properties and then use getter methods to access them. |
|
AppToolKit.NodeConfig(java.lang.String name,
java.lang.String hostName,
java.lang.String ipAddress,
int port,
int helloTime,
int refreshTime,
int holdTime,
int flushTime)
|
Method Summary | |
---|---|
java.util.Properties |
getCommProperties(java.lang.String protocol)
Get communication properties for a specific protocol |
java.lang.String |
getCommProtocol()
Get communication protocol attributes |
java.lang.String |
getDomain()
Return the domain name of this peer |
int |
getHelloProtocolChannel()
|
int |
getHelloTime()
Peer's hello time |
int |
getIntProperty(java.lang.String propName,
java.lang.String defaultValue)
|
int |
getKeepAliveTime()
Peer's keep-alive time |
java.lang.String |
getLogServerAddress()
|
int |
getLogServerPort()
|
java.lang.String |
getName()
Getters |
int |
getPeerDaemonPort()
|
java.util.Properties |
getProperties()
|
java.lang.String |
getProperty(java.lang.String propName,
java.lang.String defaultValue)
A generic getter to get properties |
java.lang.String |
getRegistryAddress()
|
int |
getRegistryPort()
|
java.lang.String |
getServerAddress()
|
java.lang.String |
getServerAddress(java.lang.String protocol)
|
int |
getServerPort()
|
int |
getServerPort(java.lang.String protocol)
|
void |
setServerAddress(java.lang.String protocol,
java.lang.String address)
|
void |
setServerPort(java.lang.String protocol,
java.lang.String port)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AppToolKit.NodeConfig(java.lang.String name, java.lang.String hostName, java.lang.String ipAddress, int port, int helloTime, int refreshTime, int holdTime, int flushTime)
public AppToolKit.NodeConfig(java.lang.String name, java.util.Properties props)
Method Detail |
---|
public java.lang.String getName()
public java.util.Properties getProperties()
public java.lang.String getDomain()
public int getHelloTime()
public int getKeepAliveTime()
public int getHelloProtocolChannel()
public java.lang.String getProperty(java.lang.String propName, java.lang.String defaultValue) throws ApplicationPropertyException
propName
- property to getdefaultValue
- a default value to give to property if it is not found
ApplicationPropertyException
public int getIntProperty(java.lang.String propName, java.lang.String defaultValue) throws ApplicationPropertyException
ApplicationPropertyException
public java.lang.String getCommProtocol() throws ApplicationPropertyException
ApplicationPropertyException
public int getServerPort() throws ApplicationPropertyException
ApplicationPropertyException
public int getServerPort(java.lang.String protocol) throws ApplicationPropertyException
ApplicationPropertyException
public void setServerPort(java.lang.String protocol, java.lang.String port) throws ApplicationPropertyException
ApplicationPropertyException
public java.lang.String getServerAddress() throws ApplicationPropertyException
ApplicationPropertyException
public java.lang.String getServerAddress(java.lang.String protocol) throws ApplicationPropertyException
ApplicationPropertyException
public java.lang.String getLogServerAddress() throws ApplicationPropertyException
ApplicationPropertyException
public int getLogServerPort() throws ApplicationPropertyException
ApplicationPropertyException
public void setServerAddress(java.lang.String protocol, java.lang.String address) throws ApplicationPropertyException
ApplicationPropertyException
public int getPeerDaemonPort() throws ApplicationPropertyException
ApplicationPropertyException
public java.util.Properties getCommProperties(java.lang.String protocol) throws ApplicationPropertyException
ApplicationPropertyException
public java.lang.String getRegistryAddress() throws ApplicationPropertyException
ApplicationPropertyException
public int getRegistryPort() throws ApplicationPropertyException
ApplicationPropertyException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |