1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.mina.protocol;
20
21 import org.apache.mina.common.Session;
22
23 /***
24 * A {@link Session} which represents high-level protocol connection between two
25 * endpoints regardless of underlying transport types.
26 *
27 * @author The Apache Directory Project (dev@directory.apache.org)
28 * @version $Rev: 357871 $, $Date: 2005-12-20 10:56:40 +0900 (Tue, 20 Dec 2005) $
29 *
30 * @see Session
31 */
32 public interface ProtocolSession extends Session
33 {
34 /***
35 * Returns the {@link ProtocolHandler} which handles this session.
36 */
37 ProtocolHandler getHandler();
38
39 /***
40 * Returns the filter chain that only affects this session.
41 */
42 ProtocolFilterChain getFilterChain();
43
44
45 /***
46 * Returns the {@link ProtocolEncoder} for this session.
47 */
48 ProtocolEncoder getEncoder();
49
50 /***
51 * Returns the {@link ProtocolDecoder} for this session.
52 */
53 ProtocolDecoder getDecoder();
54
55 /***
56 * Writes the specified <code>message</code> to remote peer. This operation
57 * is asynchronous; {@link ProtocolHandler#messageSent(ProtocolSession, Object)}
58 * will be invoked when the message is actually sent to remote peer.
59 */
60 void write( Object message );
61 }