Package com.aelitis.azureus.core.peermanager.messaging

Examples of com.aelitis.azureus.core.peermanager.messaging.Message


 
  private void sendMainlineDHTPort() {
    if (!this.ml_dht_enabled) {return;}
    MainlineDHTProvider provider = getDHTProvider();
    if (provider == null) {return;}
    Message message = new BTDHTPort(provider.getDHTPort());
    connection.getOutgoingMessageQueue().addMessage(message, false);
  }
View Full Code Here


    //find mutually available message types
    final ArrayList messages = new ArrayList();

    for (int i = 0; i < handshake.getMessageIDs().length; i++)
    {
      Message msg = MessageManager.getSingleton().lookupMessage(supported_message_ids[i]);
      if (msg != null)
      { // mutual support!
        messages.add(msg);
       
        String id = msg.getID();
        byte supported_version = supported_message_versions[i];
       
        // we can use == safely
        if (id == BTMessage.ID_BT_BITFIELD)
          other_peer_bitfield_version = supported_version;
View Full Code Here

      message.reportFailed( new Exception("No longer connected" ));
      //listener.connectionError( vconn ); //no need to call this, as there is no connection to remove
      return;
    }
   
    Message reply = new AZGenericMapPayload( message.getMessageID(), message.getPayload(), (byte)1 );

    vconn.sendMessage( message, reply );
   
    write_selector.resumeSelects( vconn.getSocketChannel() )//start write selecting now that there's something to send
  }
View Full Code Here

 
  protected void
  sendAndClose(
    String    data )
  {
    final Message  http_message = new HTTPMessage( data );
   
    getConnection().getOutgoingMessageQueue().registerQueueListener(
      new OutgoingMessageQueue.MessageQueueListener()
      {
        public boolean
View Full Code Here

  flushRequestsSupport(
    final flushListener    l )
  {
    OutgoingMessageQueue omq = getConnection().getOutgoingMessageQueue();
   
    final Message  http_message = new HTTPMessage( new byte[0] );
   
    omq.registerQueueListener(
      new OutgoingMessageQueue.MessageQueueListener()
      {
        public boolean
View Full Code Here

   
      try{

        for( int i=0; i<messages.size(); i++ ){
         
          Message msg = (Message)messages.get( i );
         
          msg.destroy();
      }
    }catch( IndexOutOfBoundsException e ){
          // as access to messages_last_read isn't synchronized we can get this error if we destroy the
          // decoder in parallel with messages being removed. We don't really want to synchornized access
          // to this so we'll take the hit here
View Full Code Here

TOP

Related Classes of com.aelitis.azureus.core.peermanager.messaging.Message

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.