1 | package org.apache.mina.protocol.vmpipe; |
2 | |
3 | import org.apache.mina.protocol.ProtocolSession; |
4 | import org.apache.mina.protocol.ProtocolSessionManager; |
5 | import org.apache.mina.protocol.ProtocolSessionManagerFilterChain; |
6 | |
7 | class VmPipeSessionManagerFilterChain extends ProtocolSessionManagerFilterChain { |
8 | |
9 | VmPipeSessionManagerFilterChain( ProtocolSessionManager manager ) |
10 | { |
11 | super( manager ); |
12 | } |
13 | |
14 | protected void doWrite( ProtocolSession session, Object message ) |
15 | { |
16 | VmPipeSession s = ( VmPipeSession ) session; |
17 | |
18 | synchronized( s.lock ) |
19 | { |
20 | if( s.closed ) |
21 | throw new IllegalStateException( "Session is closed." ); |
22 | s.remoteSession.getManagerFilterChain().messageReceived( s.remoteSession, message ); |
23 | } |
24 | } |
25 | } |