com.aelitis.azureus.core.peermanager.messaging.bittorrent.ltep
Class LTMessageEncoder

java.lang.Object
  extended by com.aelitis.azureus.core.peermanager.messaging.bittorrent.ltep.LTMessageEncoder
All Implemented Interfaces:
MessageStreamEncoder

public class LTMessageEncoder
extends Object
implements MessageStreamEncoder

Author:
Allan Crooks

Nested Class Summary
static interface LTMessageEncoder.CustomExtensionHandler
           
 
Field Summary
static int CET_PEX
           
protected static LogIDs LOGID
           
 
Constructor Summary
LTMessageEncoder(Object log_object)
           
 
Method Summary
 void addCustomExtensionHandler(int extension_type, LTMessageEncoder.CustomExtensionHandler handler)
           
 RawMessage[] encodeMessage(Message message)
          Encode the given message into the raw message output stream format.
 Object handleCustomExtension(int extension_type, Object[] args)
           
 boolean hasCustomExtensionHandler(int extension_type)
           
 boolean supportsExtension(String extension_name)
           
 boolean supportsUTMetaData()
           
 boolean supportsUTPEX()
           
 void updateSupportedExtensions(Map map)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOGID

protected static final LogIDs LOGID

CET_PEX

public static final int CET_PEX
See Also:
Constant Field Values
Constructor Detail

LTMessageEncoder

public LTMessageEncoder(Object log_object)
Method Detail

encodeMessage

public RawMessage[] encodeMessage(Message message)
Description copied from interface: MessageStreamEncoder
Encode the given message into the raw message output stream format.

Specified by:
encodeMessage in interface MessageStreamEncoder
Parameters:
message - to encode
Returns:
raw messages encoding

updateSupportedExtensions

public void updateSupportedExtensions(Map map)

supportsUTPEX

public boolean supportsUTPEX()

supportsUTMetaData

public boolean supportsUTMetaData()

supportsExtension

public boolean supportsExtension(String extension_name)

addCustomExtensionHandler

public void addCustomExtensionHandler(int extension_type,
                                      LTMessageEncoder.CustomExtensionHandler handler)

hasCustomExtensionHandler

public boolean hasCustomExtensionHandler(int extension_type)

handleCustomExtension

public Object handleCustomExtension(int extension_type,
                                    Object[] args)