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