LimeWire Consolidated API

com.limegroup.gnutella.dht.db
Class AltLocValueFactoryImpl

java.lang.Object
  extended by com.limegroup.gnutella.dht.db.AltLocValueFactoryImpl
All Implemented Interfaces:
AltLocValueFactory, DHTValueFactory<AltLocValue>

public class AltLocValueFactoryImpl
extends Object
implements AltLocValueFactory

Factory to create AltLocValues.


Constructor Summary
AltLocValueFactoryImpl(NetworkManager networkManager, ApplicationServices applicationServices)
           
 
Method Summary
 AltLocValue createAltLocValueForSelf(long fileSize, byte[] ttroot)
          Creates an alternative location value for this node.
 AltLocValue createDHTValue(DHTValueType type, Version version, byte[] value)
          Creates a DHTValue.
 AltLocValue createFromData(Version version, byte[] data)
          Factory method to create AltLocValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AltLocValueFactoryImpl

@Inject
public AltLocValueFactoryImpl(NetworkManager networkManager,
                                     ApplicationServices applicationServices)
Method Detail

createDHTValue

public AltLocValue createDHTValue(DHTValueType type,
                                  Version version,
                                  byte[] value)
                           throws DHTValueException
Description copied from interface: DHTValueFactory
Creates a DHTValue.

Specified by:
createDHTValue in interface AltLocValueFactory
Specified by:
createDHTValue in interface DHTValueFactory<AltLocValue>
Parameters:
type - The type of the value
version - The version of the value
value - The actual value
Throws:
DHTValueException

createAltLocValueForSelf

public AltLocValue createAltLocValueForSelf(long fileSize,
                                            byte[] ttroot)
Description copied from interface: AltLocValueFactory
Creates an alternative location value for this node.

Specified by:
createAltLocValueForSelf in interface AltLocValueFactory
Parameters:
fileSize - size of the file
ttroot - root hash of the TigerTree

createFromData

public AltLocValue createFromData(Version version,
                                  byte[] data)
                           throws DHTValueException
Factory method to create AltLocValue

Specified by:
createFromData in interface AltLocValueFactory
Throws:
DHTValueException

LimeWire Consolidated API

Copyright © 2009. All Rights Reserved.