AppToolKit.NodeConfig
Keywords: uk.ac.ic.doc.automed.p2p.AppToolKit.NodeConfig class

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## uk.ac.ic.doc.automed.p2p
Class AppToolKit.NodeConfig

    java.lang.Object
      uk.ac.ic.doc.automed.p2p.AppToolKit.NodeConfig

Enclosing class:
  AppToolKit

    public static class AppToolKit.NodeConfig

extends java.lang.Object

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

### AppToolKit.NodeConfig

    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)

### AppToolKit.NodeConfig

    public 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.

Method Detail

### getName

    public java.lang.String getName()

  Getters

### getProperties

    public java.util.Properties getProperties()

### getDomain

    public java.lang.String getDomain()

  Return the domain name of this peer

### getHelloTime

    public int getHelloTime()

  Peer's hello time

### getKeepAliveTime

    public int getKeepAliveTime()

  Peer's keep-alive time

### getHelloProtocolChannel

    public int getHelloProtocolChannel()

### getProperty

    public java.lang.String getProperty(java.lang.String propName,
                                        java.lang.String defaultValue)
                                 throws ApplicationPropertyException

  A generic getter to get properties

  Parameters:
    `propName` - property to get
    `defaultValue` - a default value to give to property if it is not found
  Returns:
    String the property value
  Throws:
    `ApplicationPropertyException`

### getIntProperty

    public int getIntProperty(java.lang.String propName,
                              java.lang.String defaultValue)
                       throws ApplicationPropertyException

  Throws:
    `ApplicationPropertyException`

### getCommProtocol

    public java.lang.String getCommProtocol()
                                     throws ApplicationPropertyException

  Get communication protocol attributes

  Throws:
    `ApplicationPropertyException`

### getServerPort

    public int getServerPort()
                      throws ApplicationPropertyException

  Throws:
    `ApplicationPropertyException`

### getServerPort

    public int getServerPort(java.lang.String protocol)
                      throws ApplicationPropertyException

  Throws:
    `ApplicationPropertyException`

### setServerPort

    public void setServerPort(java.lang.String protocol,
                              java.lang.String port)
                       throws ApplicationPropertyException

  Throws:
    `ApplicationPropertyException`

### getServerAddress

    public java.lang.String getServerAddress()
                                      throws ApplicationPropertyException

  Throws:
    `ApplicationPropertyException`

### getServerAddress

    public java.lang.String getServerAddress(java.lang.String protocol)
                                      throws ApplicationPropertyException

  Throws:
    `ApplicationPropertyException`

### getLogServerAddress

    public java.lang.String getLogServerAddress()
                                         throws ApplicationPropertyException

  Throws:
    `ApplicationPropertyException`

### getLogServerPort

    public int getLogServerPort()
                         throws ApplicationPropertyException

  Throws:
    `ApplicationPropertyException`

### setServerAddress

    public void setServerAddress(java.lang.String protocol,
                                 java.lang.String address)
                          throws ApplicationPropertyException

  Throws:
    `ApplicationPropertyException`

### getPeerDaemonPort

    public int getPeerDaemonPort()
                          throws ApplicationPropertyException

  Throws:
    `ApplicationPropertyException`

### getCommProperties

    public java.util.Properties getCommProperties(java.lang.String protocol)
                                           throws ApplicationPropertyException

  Get communication properties for a specific protocol

  Throws:
    `ApplicationPropertyException`

### getRegistryAddress

    public java.lang.String getRegistryAddress()
                                        throws ApplicationPropertyException

  Throws:
    `ApplicationPropertyException`

### getRegistryPort

    public int getRegistryPort()
                        throws ApplicationPropertyException

  Throws:
    `ApplicationPropertyException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD