org.resilientedge.jockey.peerbridge
Class PBNet

java.lang.Object
  |
  +--org.resilientedge.jockey.peerbridge.PBNet
All Implemented Interfaces:
java.lang.Comparable

public class PBNet
extends java.lang.Object
implements java.lang.Comparable

A definition of a peer network; one instance per peer network implementation.

Version:
$Revision: 1.1.1.1 $
Author:
John Gardner

Field Summary
static java.lang.String GNUTELLA_NETWORK
          symbolic identifier for the gnutella network type.
static java.lang.String JABBER_NETWORK
          symbolic identifier for the jabber network type (www.jabber.org).
static java.lang.String JXTA_NETWORK
          symbolic identifier for the JXTA network type (www.jxta.org).
static java.lang.String KAZAA_NETWORK
          symbolic identifier for the Kazaa/Morpheus/FastTrack network.
 
Constructor Summary
PBNet(java.lang.String networkName)
          Basic constructor.
 
Method Summary
 int compareTo(java.lang.Object other)
          Returns zero if the other network is the same as this network.
 int getNetworkId()
          Return the uniqe identifier for this peer network.
 void setNetworkId(java.lang.String networkName)
          Set the unique identifier for this type of peer network.
 PeerNetwork toPeerNetwork()
          Return a copy of this object translated to a client side token.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JXTA_NETWORK

public static final java.lang.String JXTA_NETWORK
symbolic identifier for the JXTA network type (www.jxta.org).

JABBER_NETWORK

public static final java.lang.String JABBER_NETWORK
symbolic identifier for the jabber network type (www.jabber.org).

GNUTELLA_NETWORK

public static final java.lang.String GNUTELLA_NETWORK
symbolic identifier for the gnutella network type.

KAZAA_NETWORK

public static final java.lang.String KAZAA_NETWORK
symbolic identifier for the Kazaa/Morpheus/FastTrack network.
Constructor Detail

PBNet

public PBNet(java.lang.String networkName)
Basic constructor.
Parameters:
networkId - one of the final _NETWORK constants
Method Detail

setNetworkId

public void setNetworkId(java.lang.String networkName)
Set the unique identifier for this type of peer network.
Parameters:
networkId - a symbolic constant for this network type

getNetworkId

public int getNetworkId()
Return the uniqe identifier for this peer network.
Returns:
the network id

compareTo

public int compareTo(java.lang.Object other)
Returns zero if the other network is the same as this network.
Specified by:
compareTo in interface java.lang.Comparable
Parameters:
other - network to compare
Returns:
a positive or negative integer, or zero

toPeerNetwork

public PeerNetwork toPeerNetwork()
Return a copy of this object translated to a client side token.
Returns:
a PI PeerToken


Copyright © 2001 Resilient Edge, Inc. All Rights Reserved.