Methods Summary |
---|
public static Message | createCoreBTCancel(int piece_number, int piece_offset, int length)Create a core BT Cancel message instance.
return new MessageAdapter( new BTCancel( piece_number, piece_offset, length, (byte)1 ) );
|
public static BTMessageCancel | createCoreBTCancelAdaptation(Message core_made_message)Translate the given core-made BT Cancel message into a specific plugin message adaptation.
//the message was originally created by core and wrapped
com.aelitis.azureus.core.peermanager.messaging.Message core_msg = ((MessageAdapter)core_made_message).getCoreMessage();
if( core_msg.getID().equals( BTMessage.ID_BT_CANCEL ) ) {
return new BTMessageCancel( core_msg );
}
return null;
|
public static Message | createCoreBTPiece(int piece_number, int piece_offset, java.nio.ByteBuffer data)Create a core BT Piece message instance.
return new MessageAdapter( new BTPiece( piece_number, piece_offset, new DirectByteBuffer( data ), (byte)1 ) );
|
public static BTMessagePiece | createCoreBTPieceAdaptation(Message core_made_message)Translate the given core-made BT Piece message into a specific plugin message adaptation.
//the message was originally created by core and wrapped
com.aelitis.azureus.core.peermanager.messaging.Message core_msg = ((MessageAdapter)core_made_message).getCoreMessage();
if( core_msg.getID().equals( BTMessage.ID_BT_PIECE ) ) {
return new BTMessagePiece( core_msg );
}
return null;
|
public static Message | createCoreBTRequest(int piece_number, int piece_offset, int length)Create a core BT Request message instance.
return new MessageAdapter( new BTRequest( piece_number, piece_offset, length, (byte)1 ) );
|
public static BTMessageRequest | createCoreBTRequestAdaptation(Message core_made_message)Translate the given core-made BT Request message into a specific plugin message adaptation.
//the message was originally created by core and wrapped
com.aelitis.azureus.core.peermanager.messaging.Message core_msg = ((MessageAdapter)core_made_message).getCoreMessage();
if( core_msg.getID().equals( BTMessage.ID_BT_REQUEST ) ) {
return new BTMessageRequest( core_msg );
}
return null;
|