01: package vicazh.hyperpool.stream.net.http;
02:
03: import java.io.*;
04: import java.util.logging.*;
05: import vicazh.hyperpool.Start;
06: import vicazh.hyperpool.stream.*;
07:
08: class RouterServerStream extends ServerStream {
09:
10: RouterServerStream(Session session, OutputStream outputstream) {
11: super (session, outputstream);
12: }
13:
14: public void write(int b) throws IOException {
15: if (((RouterConnection) connection).priority != null)
16: try {
17: if (((RouterConnection) connection).isReverse)
18: ((Priorities) ((ListSelectorMBean) connection.element)
19: .getList())
20: .clientwrite(((RouterConnection) connection).priority);
21: else
22: ((Priorities) ((ListSelectorMBean) connection.element)
23: .getList())
24: .serverwrite(((RouterConnection) connection).priority);
25: } catch (Exception e) {
26: Start.logger.log(Level.SEVERE, e.getMessage(), e);
27: }
28: super.write(b);
29: }
30: }
|