01: package vicazh.hyperpool.stream.net.http;
02:
03: import java.net.*;
04: import vicazh.hyperpool.stream.*;
05:
06: class HttpConnection extends Connection {
07: HttpConnection(Element element) {
08: super (element);
09: }
10:
11: protected Session getSession() {
12: return new HttpSession(this );
13: }
14:
15: String authority;
16:
17: Socket socket;
18:
19: synchronized public void close() {
20: try {
21: socket.close();
22: } catch (Exception e) {
23: }
24: super .close();
25: notifyAll();
26: }
27:
28: synchronized public void remove(Session session) {
29: super .remove(session);
30: if (getSessions().size() == 1)
31: notify();
32: }
33: }
|