edu.nyu.cs.pdsg.drbac
Class DiscoveryTag

java.lang.Object
  extended byedu.nyu.cs.pdsg.drbac.DiscoveryTag
All Implemented Interfaces:
java.io.Serializable

public class DiscoveryTag
extends java.lang.Object
implements java.io.Serializable

An component containing information about the role's home server.

See Also:
Serialized Form

Field Summary
private  RoleId homeID
           
private  java.net.InetAddress homeIPAddr
           
private  int homePort
           
static int MAX_TTL
           
static int MIN_TTL
           
static int NONE
           
static int NUM_FLAG_TYPES
           
private  int objFlagType
           
static int SEARCH_FROM_OBJ
           
static int SEARCH_FROM_SUB
           
static int STORE_WITH_OBJ
           
static int STORE_WITH_SUB
           
private  int subFlagType
           
private  int ttl
           
 
Constructor Summary
DiscoveryTag(java.net.InetAddress homeIPAddr, RoleId homeID, int ttl, int subFlagType, int objFlagType, int port)
          Instantate a DiscoveryTag
DiscoveryTag(java.lang.String homeIPAddrString, RoleId discoveryTagRoleId, java.lang.String ttlString, java.lang.String subFlagTypeString, java.lang.String objFlagTypeString, java.lang.String portString)
          Instantate a DiscoveryTag
 
Method Summary
 boolean equals(java.lang.Object o)
          compare this tag to another
 RoleId getHomeID()
           
 java.net.InetAddress getHomeIP()
           
 int getHomePort()
           
 int getObjFlagType()
           
 int getSubFlagType()
           
 int getTTL()
           
 boolean isObjectSearchable()
           
 boolean isSubjectSearchable()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MIN_TTL

public static final int MIN_TTL
See Also:
Constant Field Values

MAX_TTL

public static final int MAX_TTL
See Also:
Constant Field Values

NUM_FLAG_TYPES

public static final int NUM_FLAG_TYPES
See Also:
Constant Field Values

NONE

public static final int NONE
See Also:
Constant Field Values

STORE_WITH_SUB

public static final int STORE_WITH_SUB
See Also:
Constant Field Values

SEARCH_FROM_SUB

public static final int SEARCH_FROM_SUB
See Also:
Constant Field Values

STORE_WITH_OBJ

public static final int STORE_WITH_OBJ
See Also:
Constant Field Values

SEARCH_FROM_OBJ

public static final int SEARCH_FROM_OBJ
See Also:
Constant Field Values

homeIPAddr

private final java.net.InetAddress homeIPAddr

homePort

private final int homePort

homeID

private final RoleId homeID

ttl

private final int ttl

subFlagType

private final int subFlagType

objFlagType

private final int objFlagType
Constructor Detail

DiscoveryTag

public DiscoveryTag(java.net.InetAddress homeIPAddr,
                    RoleId homeID,
                    int ttl,
                    int subFlagType,
                    int objFlagType,
                    int port)
             throws InvalidFlagArgException,
                    InvalidTTLException
Instantate a DiscoveryTag

Parameters:
homeIPAddr - the home server of this role
homeID - the role controlling the server
ttl - the time to live of the server; 0 for no death
subFlagType - the subject search mode
objFlagType - the object search mode
port - the port of the home server of this role

DiscoveryTag

public DiscoveryTag(java.lang.String homeIPAddrString,
                    RoleId discoveryTagRoleId,
                    java.lang.String ttlString,
                    java.lang.String subFlagTypeString,
                    java.lang.String objFlagTypeString,
                    java.lang.String portString)
             throws java.net.UnknownHostException
Instantate a DiscoveryTag

Parameters:
homeIPAddrString - the home server of this role
Method Detail

equals

public boolean equals(java.lang.Object o)
compare this tag to another

Parameters:
o - the object to compare
Returns:
true if the two are the same tag

getHomeIP

public java.net.InetAddress getHomeIP()
Returns:
the home server's ip

getHomePort

public int getHomePort()
Returns:
the home server's port

getHomeID

public RoleId getHomeID()
Returns:
the home server's identification

getTTL

public int getTTL()
Returns:
the role's time to live

getSubFlagType

public int getSubFlagType()
Returns:
the subject search mode

getObjFlagType

public int getObjFlagType()
Returns:
the object search mode

isSubjectSearchable

public boolean isSubjectSearchable()

isObjectSearchable

public boolean isObjectSearchable()

toString

public java.lang.String toString()
Returns:
a human readable representation of this searchtag


Copyright (c) 2002-2003 New York University RLAB