//so just use original plugin message...i.e. unwrap out of MessageAdapter
return listener.messageAdded( ((MessageAdapter)message).getPluginMessage() );
}
//message originally created by core
return listener.messageAdded( new MessageAdapter( message ) );
}
public void messageQueued( com.aelitis.azureus.core.peermanager.messaging.Message message ) { /*nothing*/ }
public void messageRemoved( com.aelitis.azureus.core.peermanager.messaging.Message message ) { /*nothing*/ }
public void messageSent( com.aelitis.azureus.core.peermanager.messaging.Message message ) {
if( message instanceof MessageAdapter ) {
//the message must have been originally created by plugin encoder and wrapped
//so just use original plugin message...i.e. unwrap out of MessageAdapter
listener.messageSent( ((MessageAdapter)message).getPluginMessage() );
return;
}
//message originally created by core
listener.messageSent( new MessageAdapter( message ) );
}
public void protocolBytesSent( int byte_count ) { listener.bytesSent( byte_count ); }
public void dataBytesSent( int byte_count ) { listener.bytesSent( byte_count ); }