Class EchoComponent

All Implemented Interfaces:
ClusteredComponentIfc, Configurable, XMPPService, ConfigurationChangedAware, Initializable, MessageReceiver, PacketWriterWithTimeout, ServerComponent, StatisticsContainer, StatisticsContainerIfc, VHostListener

public class EchoComponent extends AbstractMessageReceiver
Created: Sep 30, 2010 1:07:13 PM
Author:
Artur Hefczyc
  • Constructor Details

    • EchoComponent

      public EchoComponent()
  • Method Details

    • processPacket

      public void processPacket(Packet packet)
      Description copied from class: AbstractMessageReceiver
      This is the main Packet processing method. It is called concurrently from many threads so implementing it in thread save manner is essential. The method is called for each packet addressed to the component.
      Please note, the Packet instance may be processed by different parts of the server, different components or plugins at the same time. Therefore this is very important to tread the Packet instance as unmodifiable object.
      Processing in this method is asynchronous, therefore there is no result value. If there are some 'result' packets generated during processing, they should be passed back using addOutPacket(Packet) method.
      Specified by:
      processPacket in class AbstractMessageReceiver
      Parameters:
      packet - is an instance of the Packet class passed for processing.