Package com.biglybt.pif.messaging
Interface MessageManager
- All Known Implementing Classes:
MessageManagerImpl
public interface MessageManager
Manages peer message handling.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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.registerGenericMessageType
(String type, String description, int stream_encryption, GenericMessageHandler handler) Register a peer-independent message handlervoid
registerMessageType
(Message message) Register the given message type with the manager for processing.
-
Field Details
-
STREAM_ENCRYPTION_NONE
static final int STREAM_ENCRYPTION_NONE- See Also:
-
STREAM_ENCRYPTION_RC4_PREFERRED
static final int STREAM_ENCRYPTION_RC4_PREFERRED- See Also:
-
STREAM_ENCRYPTION_RC4_REQUIRED
static final int STREAM_ENCRYPTION_RC4_REQUIRED- See Also:
-
-
Method Details
-
registerMessageType
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
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 managermessage
- to matchlistener
- to notify
-
cancelCompatiblePeersLocation
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
-