org.gudy.azureus2.plugins.messaging
Interface MessageManager

All Known Implementing Classes:
MessageManagerImpl

public interface MessageManager

Manages peer message handling.


Field Summary
static int STREAM_ENCRYPTION_NONE
           
static int STREAM_ENCRYPTION_RC4_PREFERRED
           
static int STREAM_ENCRYPTION_RC4_REQUIRED
           
 
Method Summary
 void cancelCompatiblePeersLocation(MessageManagerListener orig_listener)
          Cancel registration for compatible-peer notification.
 void deregisterMessageType(Message message)
          Remove registration of given message type from manager.
 void locateCompatiblePeers(PluginInterface plug_interface, Message message, MessageManagerListener listener)
          Globally register for notification of peers that support the given message type.
 GenericMessageRegistration registerGenericMessageType(String type, String description, int stream_encryption, GenericMessageHandler handler)
          Register a peer-independent message handler
 void registerMessageType(Message message)
          Register the given message type with the manager for processing.
 

Field Detail

STREAM_ENCRYPTION_NONE

static final int STREAM_ENCRYPTION_NONE
See Also:
Constant Field Values

STREAM_ENCRYPTION_RC4_PREFERRED

static final int STREAM_ENCRYPTION_RC4_PREFERRED
See Also:
Constant Field Values

STREAM_ENCRYPTION_RC4_REQUIRED

static final int STREAM_ENCRYPTION_RC4_REQUIRED
See Also:
Constant Field Values
Method Detail

registerMessageType

void registerMessageType(Message message)
                         throws MessageException
Register the given message type with the manager for processing. NOTE: A message type needs to be registered in order for support to be advertised to other peers.

Parameters:
message - instance to use for decoding
Throws:
MessageException - if this message type has already been registered

deregisterMessageType

void deregisterMessageType(Message message)
Remove registration of given message type from manager.

Parameters:
message - type to remove

locateCompatiblePeers

void locateCompatiblePeers(PluginInterface plug_interface,
                           Message message,
                           MessageManagerListener listener)
Globally register for notification of peers that support the given message type.

Parameters:
plug_interface - to get the download manager
message - to match
listener - to notify

cancelCompatiblePeersLocation

void cancelCompatiblePeersLocation(MessageManagerListener orig_listener)
Cancel registration for compatible-peer notification.

Parameters:
orig_listener - listener used for registration

registerGenericMessageType

GenericMessageRegistration registerGenericMessageType(String type,
                                                      String description,
                                                      int stream_encryption,
                                                      GenericMessageHandler handler)
                                                      throws MessageException
Register a peer-independent message handler

Parameters:
type -
description -
handler -
Returns:
Throws:
MessageException