LimeWire Consolidated API

com.limegroup.gnutella.version
Interface UpdateHandler

All Known Implementing Classes:
UpdateHandlerImpl

public interface UpdateHandler


Method Summary
 void addListener(EventListener<UpdateEvent> listener)
           
 byte[] getLatestBytes()
          Gets the bytes to send on the wire.
 int getLatestId()
          Retrieves the latest id available.
 byte[] getOldUpdateResponse()
          Returns the final bytes that the old key system used for update responses.
 UpdateCollection getUpdateCollection()
          Returns the currently known update collection.
 void handleNewData(byte[] data, ReplyHandler handler)
          Notification that a new message has arrived.
 void handleUpdateAvailable(ReplyHandler rh, int version)
          Notification that a ReplyHandler has received a VM containing an update.
 void initialize()
          Initializes data as read from disk.
 void inNetworkDownloadFinished(URN urn, boolean good)
          Notifies this that an update with the given URN has finished downloading.
 boolean removeListener(EventListener<UpdateEvent> listener)
           
 

Method Detail

initialize

void initialize()
Initializes data as read from disk.


handleUpdateAvailable

void handleUpdateAvailable(ReplyHandler rh,
                           int version)
Notification that a ReplyHandler has received a VM containing an update.


handleNewData

void handleNewData(byte[] data,
                   ReplyHandler handler)
Notification that a new message has arrived. (The actual processing is passed of to be run in a different thread. All notifications are processed in the same thread, sequentially.)


getLatestId

int getLatestId()
Retrieves the latest id available.


getLatestBytes

byte[] getLatestBytes()
Gets the bytes to send on the wire.


inNetworkDownloadFinished

void inNetworkDownloadFinished(URN urn,
                               boolean good)
Notifies this that an update with the given URN has finished downloading. If this was our update, we notify the gui. Its ok if the user restarts as the rest of the updates will be downloaded the next session.


getOldUpdateResponse

byte[] getOldUpdateResponse()
Returns the final bytes that the old key system used for update responses.


getUpdateCollection

UpdateCollection getUpdateCollection()
Returns the currently known update collection.

Returns:
null if there is none

addListener

void addListener(EventListener<UpdateEvent> listener)

removeListener

boolean removeListener(EventListener<UpdateEvent> listener)

LimeWire Consolidated API

Copyright © 2009. All Rights Reserved.