Methods Summary |
---|
public com.aelitis.azureus.core.peermanager.messaging.Message | deserialize(DirectByteBuffer data, byte version)
if( data == null ) {
throw new MessageException( "[" +getID()+ "] decode error: data == null" );
}
if( data.remaining( DirectByteBuffer.SS_MSG ) < 4 ) {
throw new MessageException( "[" +getID() + "] decode error: payload.remaining[" +data.remaining( DirectByteBuffer.SS_MSG )+ "] < 4" );
}
int id = data.getInt( DirectByteBuffer.SS_MSG );
return new AZSessionBitfield( id, data, version );
|
public void | destroy()
if( bitfield != null ) bitfield.returnToPool();
|
public DirectByteBuffer | getBitfield() return bitfield;
|
public DirectByteBuffer[] | getData()
DirectByteBuffer sess = DirectByteBufferPool.getBuffer( DirectByteBuffer.AL_MSG, 4 );
sess.putInt( DirectByteBuffer.SS_MSG, session_id );
sess.flip( DirectByteBuffer.SS_MSG );
return new DirectByteBuffer[]{ sess, bitfield };
|
public java.lang.String | getDescription() return getID() +" session #"+ session_id;
|
public java.lang.String | getFeatureID() throw new RuntimeException( "not implemented" );
|
public int | getFeatureSubID() throw new RuntimeException( "not implemented" );
|
public java.lang.String | getID() return AZMessage.ID_AZ_SESSION_BITFIELD;
|
public byte[] | getIDBytes() return AZMessage.ID_AZ_SESSION_BITFIELD_BYTES;
|
public int | getSessionID() return session_id;
|
public int | getType() return Message.TYPE_PROTOCOL_PAYLOAD;
|
public byte | getVersion() return version;
|