Methods Summary |
---|
public Message | create(java.nio.ByteBuffer data)
if( core_msg == null ) {
return plug_msg.create( data );
}
try{
return new MessageAdapter( core_msg.deserialize( new DirectByteBuffer( data ), (byte)1 ) );
}
catch( com.aelitis.azureus.core.peermanager.messaging.MessageException e ) {
throw new MessageException( e.getMessage() );
}
|
public com.aelitis.azureus.core.peermanager.messaging.Message | deserialize(org.gudy.azureus2.core3.util.DirectByteBuffer data, byte version)
if( plug_msg == null ) {
return core_msg.deserialize( data, version );
}
try{
return new MessageAdapter( plug_msg.create( data.getBuffer( DirectByteBuffer.SS_MSG ) ) );
}
catch( MessageException e ) {
throw new com.aelitis.azureus.core.peermanager.messaging.MessageException( e.getMessage() );
}
finally {
data.returnToPool();
}
|
public void | destroy()
if( core_msg == null ) plug_msg.destroy();
else core_msg.destroy();
|
public com.aelitis.azureus.core.peermanager.messaging.Message | getCoreMessage() return core_msg;
|
public org.gudy.azureus2.core3.util.DirectByteBuffer[] | getData()
if( plug_msg == null ) {
return core_msg.getData();
}
ByteBuffer[] bbs = plug_msg.getPayload();
DirectByteBuffer[] dbbs = new DirectByteBuffer[ bbs.length ]; //TODO cache it???
for( int i=0; i < bbs.length; i++ ) {
dbbs[i] = new DirectByteBuffer( bbs[i] );
}
return dbbs;
|
public java.lang.String | getDescription()
return core_msg == null ? plug_msg.getDescription() : core_msg.getDescription();
|
public java.lang.String | getFeatureID() return ADVMessage.PLUGIN_MESSAGE_FEATURE_ID;
|
public int | getFeatureSubID() return -1;
|
public java.lang.String | getID()
return core_msg == null ? plug_msg.getID() : core_msg.getID();
|
public byte[] | getIDBytes()
return core_msg == null ? plug_msg.getID().getBytes() : core_msg.getIDBytes();
|
public java.nio.ByteBuffer[] | getPayload()
if( core_msg == null ) {
return plug_msg.getPayload();
}
DirectByteBuffer[] dbbs = core_msg.getData();
ByteBuffer[] bbs = new ByteBuffer[ dbbs.length ]; //TODO cache it???
for( int i=0; i < dbbs.length; i++ ) {
bbs[i] = dbbs[i].getBuffer( DirectByteBuffer.SS_MSG );
}
return bbs;
|
public Message | getPluginMessage() return plug_msg;
|
public int | getType()
return core_msg == null ? plug_msg.getType() : core_msg.getType();
|
public byte | getVersion()
return core_msg == null ? (byte)1 : core_msg.getVersion();
|