KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > ubermq > kernel > IMessageProcessor


1 package com.ubermq.kernel;
2
3 /**
4  * A message processor that is connection aware, and can
5  * handle multiple connections.
6  */

7 public interface IMessageProcessor
8 {
9     /**
10      * Accepts an incoming connection. This is called before a
11      * <code>process</code> is called with the connection as the sender.
12      * @param conn the connection to accept
13      */

14     public void accept(IConnectionInfo conn);
15     
16     /**
17      * Processes a datagram. <code>accept</code> will have been called with
18      * <code>conn</code> as the parameter before this method is called.
19      * @param conn the connection used to send the datagram
20      * @param d the datagram sent.
21      */

22     public void process(IConnectionInfo conn, IDatagram d);
23     
24     /**
25      * Removes a connection.
26      */

27     public void remove(IConnectionInfo conn);
28 }
29
Popular Tags