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
`int` | `getIntProperty(java.lang.String propName, java.lang.String defaultValue)`
`java.lang.String` | `getName()` Getters
`java.lang.String` | `getProperty(java.lang.String propName, java.lang.String defaultValue)` A generic getter to get properties

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

### getProperty

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

  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

### getIntProperty

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

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