netcom.mds
Class AbstractShare

java.lang.Object
  extended bynetcom.mds.AbstractShare
All Implemented Interfaces:
java.lang.Comparable, java.io.Serializable
Direct Known Subclasses:
ChatShare, FileShare

public abstract class AbstractShare
extends java.lang.Object
implements java.lang.Comparable, java.io.Serializable

Title: Abstract Share

Description: This represents one shared piece of information by a PServer

Copyright: Copyright (c) 2002

Company: NETCOM

See Also:
FileShare, ChatShare, Serialized Form

Field Summary
 java.lang.String[] access_list
          An array of Strings that has name of the PClients who can access this share.
 java.lang.String id
          Unique ID for the share.
 java.util.List[] name_list_pairs
          A array of Lists used to see if a share matches a SearchRequest.
 java.lang.String ps_name
          This is the name of the PServer which created and owns this share
 java.lang.String share_name
          This is the name of the Share
 AddressPort source
          Socket of the PServer who has the share.
 
Constructor Summary
AbstractShare(java.lang.String ps_name, java.lang.String share_name, AddressPort source, java.lang.String id, java.lang.String[] access_list, java.util.List[] name_list_pairs)
          Constructs an AbstractShare object representing a share on a PServer
 
Method Summary
abstract  int compareTo(java.lang.Object o)
          This method is provided so that AbstractShares can be placed into sorted data structures so a search can be performed on them optimally.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ps_name

public final java.lang.String ps_name
This is the name of the PServer which created and owns this share


share_name

public final java.lang.String share_name
This is the name of the Share


source

public final AddressPort source
Socket of the PServer who has the share. Used to retrieve the share.


id

public final java.lang.String id
Unique ID for the share. Used to get data from the PServer


access_list

public final java.lang.String[] access_list
An array of Strings that has name of the PClients who can access this share. Null if everyone can access it.


name_list_pairs

public final java.util.List[] name_list_pairs
A array of Lists used to see if a share matches a SearchRequest.

Constructor Detail

AbstractShare

public AbstractShare(java.lang.String ps_name,
                     java.lang.String share_name,
                     AddressPort source,
                     java.lang.String id,
                     java.lang.String[] access_list,
                     java.util.List[] name_list_pairs)
Constructs an AbstractShare object representing a share on a PServer

Parameters:
ps_name - A String containingname of the PServer to add the share to
share_name - A String representing the name of the Share
source - An AddressPort that is the Socket of the PServer with the Share
id - A unique String that represents this spedcific share. Used to get data from PServer
access_list - An array of Strings containing all PClients who have permission to Share. null if everyone has access
name_list_pairs - An array of Lists that have the name lists representing the Share and used for searching for shares within PSDatas
Method Detail

compareTo

public abstract int compareTo(java.lang.Object o)
This method is provided so that AbstractShares can be placed into sorted data structures so a search can be performed on them optimally. Abstract method so each type of share must have method of comparison

Specified by:
compareTo in interface java.lang.Comparable
Parameters:
o - Object to compare this object against