uk.ac.ic.doc.automed.p2p.son
Class SMRFactory
java.lang.Object
uk.ac.ic.doc.automed.p2p.son.SMRFactory
public class SMRFactory
- extends java.lang.Object
- Version:
- 1.0
Department of Computing, Imperial College
- Author:
- Duc M Le dmle@doc.ic.ac.uk
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CHORD
public static final int CHORD
- See Also:
- Constant Field Values
PGRID
public static final int PGRID
- See Also:
- Constant Field Values
CHORD_NAME
public static final java.lang.String CHORD_NAME
- See Also:
- Constant Field Values
PGRID_NAME
public static final java.lang.String PGRID_NAME
- See Also:
- Constant Field Values
pgridHelper
private static PGridNetworkHelper pgridHelper
chordHelper
private static ChordNetworkHelper chordHelper
SMRFactory
private SMRFactory()
getSMRControllerInstance
public static SMRController getSMRControllerInstance(int type,
java.lang.Object peerID,
java.lang.String selfHost,
int selfPort,
AutoMedPeer p,
java.util.Properties props)
throws SMRInitException
- Create a new instance of a
SMRController
- Parameters:
type
- type of controller to createpeerID
- the peerIDselfHost
- the name of the peer's hostselfPort
- the peer's port for listening to connectionsp
- the AutoMedPeer
to which this peer is representingprops
- any extra parameters
- Returns:
- an instance of
SMRController
- Throws:
SMRInitException
getPGridHelper
public static PGridNetworkHelper getPGridHelper()
getChordHelper
public static ChordNetworkHelper getChordHelper()
displayStat
public static void displayStat(SMRController smrc,
java.io.PrintStream out)
- Periodically display status of the DHT
generateDHTID
public static ow.id.ID generateDHTID(java.lang.String str)
- Generate a DHT-based id from a string
- Parameters:
str
- the string from which to generate the id
- Returns:
- an instance of
ID
object
getTypeID
public static int getTypeID(java.lang.String smrTypeName)