HelloMsg
Keywords: uk.ac.ic.doc.rodex.p2p.messages.applicationlayer.HelloMsg 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.rodex.p2p.messages.applicationlayer
Class HelloMsg

    java.lang.Object
      uk.ac.ic.doc.rodex.p2p.messages.applicationlayer.HelloMsg

All Implemented Interfaces:
  ApplicationMessage

Direct Known Subclasses:
  HelloAckMsg

    public class HelloMsg

extends java.lang.Object
implements ApplicationMessage

HelloMsg.java
The Hello message exchanged between peers

Author:
  Duc M Le dmle@doc.ic.ac.uk
  Created on April 18, 2006
  Department of Computing, Imperial College

Field Summary
`protected java.lang.String` | `address`
`protected AuthenticationTuple` | `authentication`
`protected java.lang.String` | `domain`
`protected java.lang.String` | `name`
`protected int` | `port`
`protected java.lang.String` | `yourAddress`

Constructor Summary
`HelloMsg(java.lang.String domain, java.lang.String name, java.lang.String address)`
`HelloMsg(java.lang.String domain, java.lang.String name, java.lang.String address, int port, AuthenticationTuple authentication)` Creates a new instance of HelloMsg

Method Summary
`ApplicationMessage` | `createFrom(AbstractMessage message)` Return an instance of this message created from a given `AbstractMessage` This method is used by the receiving peer to decode the message
`AbstractMessage` | `getAbstractMessage()` Return the actual message
`java.lang.String` | `getAddress()` Peer's IP address
`AuthenticationTuple` | `getAuthentication()` Peer's authentication
`java.lang.String` | `getContext()` Return the message context
`java.lang.String` | `getDomain()` Peer's domain
`java.lang.String` | `getEncryption()`
`java.lang.String` | `getName()` Peer's name
`java.lang.String` | `getPassword()`
`java.lang.String` | `getPerformative()` Return the message's performative
`int` | `getPort()` Peer's port
`java.lang.String` | `getUserName()`
`java.lang.String` | `getYourAddress()`
`void` | `setAddress(java.lang.String address)`
`void` | `setName(java.lang.String name)`
`void` | `setPort(int port)`
`void` | `setYourAddress(java.lang.String address)` Set the actual peer's address after hello message was received

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

Field Detail

### domain

    protected java.lang.String domain

### name

    protected java.lang.String name

### address

    protected java.lang.String address

### port

    protected int port

### authentication

    protected AuthenticationTuple authentication

### yourAddress

    protected java.lang.String yourAddress

Constructor Detail

### HelloMsg

    public HelloMsg(java.lang.String domain,
                    java.lang.String name,
                    java.lang.String address,
                    int port,
                    AuthenticationTuple authentication)

  Creates a new instance of HelloMsg

  Parameters:
    `domain` - domain name of the peer
    `name` - peer's name on the network
    `address` - IP address of the peer
    `port` - peer's daemon port (optional)
    `authentication` - if not `null` then a shared-key
    authentication is required

### HelloMsg

    public HelloMsg(java.lang.String domain,
                    java.lang.String name,
                    java.lang.String address)

Method Detail

### getPerformative

    public java.lang.String getPerformative()

  Return the message's performative

  Specified by:
    `getPerformative` in interface `ApplicationMessage`

### getContext

    public java.lang.String getContext()

  Return the message context

  Specified by:
    `getContext` in interface `ApplicationMessage`

### getAbstractMessage

    public AbstractMessage getAbstractMessage()

  Return the actual message

  Specified by:
    `getAbstractMessage` in interface `ApplicationMessage`

### createFrom

    public ApplicationMessage createFrom(AbstractMessage message)

  Return an instance of this message created from a given `AbstractMessage` This method is used by the receiving peer to decode the message

  Specified by:
    `createFrom` in interface `ApplicationMessage`

### setName

    public void setName(java.lang.String name)

### setAddress

    public void setAddress(java.lang.String address)

### setPort

    public void setPort(int port)

### getDomain

    public java.lang.String getDomain()

  Peer's domain

### getName

    public java.lang.String getName()

  Peer's name

### getAddress

    public java.lang.String getAddress()

  Peer's IP address

### getPort

    public int getPort()

  Peer's port

### getAuthentication

    public AuthenticationTuple getAuthentication()

  Peer's authentication

### getUserName

    public java.lang.String getUserName()

### getPassword

    public java.lang.String getPassword()

### getEncryption

    public java.lang.String getEncryption()

### setYourAddress

    public void setYourAddress(java.lang.String address)

  Set the actual peer's address after hello message was received

### getYourAddress

    public java.lang.String getYourAddress()

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