01: package examples;
02:
03: import java.io.*;
04: import vicazh.hyperpool.stream.net.http.*;
05:
06: class ExampleServiceSession extends Session {
07: ExampleServiceSession(Connection connection) {
08: super (connection);
09: }
10:
11: public void setClient(OutputStream outputstream) throws IOException {
12: if (((ExampleService) connection.element).isClient())
13: setClient(new ExampleServiceClientStream(this , outputstream));
14: else
15: super .setClient(outputstream);
16: }
17:
18: public void setServer(OutputStream outputstream) throws IOException {
19: if (((ExampleService) connection.element).isServer())
20: setServer(new ExampleServiceServerStream(this, outputstream));
21: else
22: super.setServer(outputstream);
23: }
24: }
|