jimm.twice.ice
Class Party

java.lang.Object
  extended byjimm.twice.ice.Party

public class Party
extends java.lang.Object

A party is either a syndicator or a subscriber.

Author:
Jim Menard, jimm@io.com

Field Summary
protected  java.lang.String locationURL
           
protected  java.lang.String name
           
protected  int role
           
static int ROLE_SUBSCRIBER
           
static java.lang.String ROLE_SUBSCRIBER_STRING
           
static int ROLE_SYNDICATOR
           
static java.lang.String ROLE_SYNDICATOR_STRING
           
protected  java.lang.String uuid
           
 
Constructor Summary
Party(java.lang.String id, java.lang.String name, int role, java.lang.String locationURL)
          Constructor.
 
Method Summary
 java.lang.String getLocationURL()
          Returns the URL of the party's HTTP "listener", as a string.
 java.lang.String getName()
           
 int getRole()
          Returns the role, either ROLE_SYNDICATOR or ROLE_SUBSCRIBER.
 java.lang.String getRoleString()
          Returns the role as a string, either ROLE_SYNDICATOR_STRING or ROLE_SUBSCRIBER_STRING.
 java.lang.String getUuid()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ROLE_SYNDICATOR

public static final int ROLE_SYNDICATOR
See Also:
Constant Field Values

ROLE_SUBSCRIBER

public static final int ROLE_SUBSCRIBER
See Also:
Constant Field Values

ROLE_SYNDICATOR_STRING

public static final java.lang.String ROLE_SYNDICATOR_STRING
See Also:
Constant Field Values

ROLE_SUBSCRIBER_STRING

public static final java.lang.String ROLE_SUBSCRIBER_STRING
See Also:
Constant Field Values

uuid

protected java.lang.String uuid

name

protected java.lang.String name

role

protected int role

locationURL

protected java.lang.String locationURL
Constructor Detail

Party

public Party(java.lang.String id,
             java.lang.String name,
             int role,
             java.lang.String locationURL)
Constructor.

Parameters:
id - Universally Unique Identifier (UUID)
name - a string
role - one of ROLE_SYNDICATOR or ROLE_SUBSCRIBER
locationURL - location URL (the "listener" URL, not the human-readable website URL)
Method Detail

getUuid

public java.lang.String getUuid()

getName

public java.lang.String getName()

getRole

public int getRole()
Returns the role, either ROLE_SYNDICATOR or ROLE_SUBSCRIBER.

Returns:
a Party role constant
See Also:
Party

getRoleString

public java.lang.String getRoleString()
Returns the role as a string, either ROLE_SYNDICATOR_STRING or ROLE_SUBSCRIBER_STRING.

Returns:
a Party role string
See Also:
Party

getLocationURL

public java.lang.String getLocationURL()
Returns the URL of the party's HTTP "listener", as a string. This is not the URL of the party's human-readable Web site.

Returns:
a URL string