PeerDescription
Keywords: uk.ac.ic.doc.automed.p2p.directory.PeerDescription 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.directory
Class PeerDescription

    java.lang.Object
      uk.ac.ic.doc.automed.p2p.directory.PeerDescription

All Implemented Interfaces:
  P2PDirectoryObject

    public class PeerDescription

extends java.lang.Object
implements P2PDirectoryObject

Description of a Peer on the P2P network. Peers are idenfified by their name, and will be located at a URL that might change over file.

Field Summary
`java.lang.String` | `hostname`
`java.lang.String` | `name`
`java.lang.String` | `port`
`java.lang.String` | `url`

Constructor Summary
`PeerDescription(java.lang.String name, java.lang.String url)`
`PeerDescription(java.lang.String name, java.lang.String url, java.lang.String status, java.lang.String lastUpdate)`
`PeerDescription(java.lang.String domain, java.lang.String name, java.lang.String url, java.lang.String port, java.lang.String user, java.lang.String pwd, java.lang.String encryption, java.lang.String status, java.lang.String lastUpdate)` The full constructor

Method Summary
`static java.util.List` | `convertIntoObjects(java.util.List rows)`
`static PeerDescription` | `createFrom(java.util.List data, java.util.List metadata)`
`boolean` | `equals(java.lang.Object o)`
`java.lang.String` | `getAgeTime()`
`java.util.List` | `getAsList()`
`java.lang.String` | `getDomain()` Return the peer's domain
`java.lang.String` | `getEncrypt()`
`java.lang.String` | `getLastUpdate()`
`java.util.List` | `getMetaData()`
`java.lang.String` | `getName()` Get the logical name of the Peer being described.
`java.lang.String` | `getPort()`
`java.lang.String` | `getPwd()`
`java.lang.String` | `getStatus()` Getter for status and last update
`java.lang.String` | `getURL()` Get the URL that the P2PDirectory has this peer down as being located at.
`java.lang.String` | `getUser()`
`int` | `hashCode()`
`boolean` | `persist()`
`void` | `setLastUpdate(java.lang.String lastUpdate)`
`void` | `setStatus(java.lang.String status)`
`void` | `setURL(java.lang.String url)`
`static java.lang.String` | `toString(java.lang.Object o)`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### name

    public java.lang.String name

### url

    public java.lang.String url

### hostname

    public java.lang.String hostname

### port

    public java.lang.String port

Constructor Detail

### PeerDescription

    public PeerDescription(java.lang.String name,
                           java.lang.String url)

### PeerDescription

    public PeerDescription(java.lang.String name,
                           java.lang.String url,
                           java.lang.String status,
                           java.lang.String lastUpdate)

### PeerDescription

    public PeerDescription(java.lang.String domain,
                           java.lang.String name,
                           java.lang.String url,
                           java.lang.String port,
                           java.lang.String user,
                           java.lang.String pwd,
                           java.lang.String encryption,
                           java.lang.String status,
                           java.lang.String lastUpdate)

  The full constructor

Method Detail

### getDomain

    public java.lang.String getDomain()

  Return the peer's domain

### getName

    public java.lang.String getName()

  Get the logical name of the Peer being described. This should be unique accross the whole P2P network.

### getPort

    public java.lang.String getPort()

### getURL

    public java.lang.String getURL()

  Get the URL that the P2PDirectory has this peer down as being located at.

### setURL

    public void setURL(java.lang.String url)

### getUser

    public java.lang.String getUser()

### getPwd

    public java.lang.String getPwd()

### getEncrypt

    public java.lang.String getEncrypt()

### getStatus

    public java.lang.String getStatus()

  Getter for status and last update

### setStatus

    public void setStatus(java.lang.String status)

### getAgeTime

    public java.lang.String getAgeTime()

### getLastUpdate

    public java.lang.String getLastUpdate()

### setLastUpdate

    public void setLastUpdate(java.lang.String lastUpdate)

### toString

    public static java.lang.String toString(java.lang.Object o)

### persist

    public boolean persist()
                    throws java.sql.SQLException

  Specified by:
    `persist` in interface `P2PDirectoryObject`
  Throws:
    `java.sql.SQLException`

### convertIntoObjects

    public static java.util.List convertIntoObjects(java.util.List rows)

  Parameters:
    `rows` -
  Returns:

### getAsList

    public java.util.List getAsList()

  Specified by:
    `getAsList` in interface `P2PDirectoryObject`

### getMetaData

    public java.util.List getMetaData()

  Specified by:
    `getMetaData` in interface `P2PDirectoryObject`

### createFrom

    public static PeerDescription createFrom(java.util.List data,
                                             java.util.List metadata)

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `java.lang.Object`

### equals

    public boolean equals(java.lang.Object o)

  Overrides:
    `equals` in class `java.lang.Object`

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