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 PortsServerStream extends ServerStream {
09:
10: PortsServerStream(Session session, OutputStream outputstream) {
11: super (session, outputstream);
12: }
13:
14: public void write(int b) throws IOException {
15: if (((PortsConnection) connection).priority != null)
16: try {
17: if (((PortsConnection) connection).isReverse)
18: ((Priorities) ((ListSelectorMBean) connection.element)
19: .getList())
20: .clientwrite(((PortsConnection) connection).priority);
21: else
22: ((Priorities) ((ListSelectorMBean) connection.element)
23: .getList())
24: .serverwrite(((PortsConnection) connection).priority);
25: } catch (Exception e) {
26: Start.logger.log(Level.SEVERE, e.getMessage(), e);
27: }
28: super.write(b);
29: }
30: }
|