01: package vicazh.hyperpool.stream;
02:
03: import java.io.*;
04: import java.util.*;
05:
06: /**
07: * The interface for all stream elements
08: *
09: * @author Victor Zhigunov
10: * @version 0.3.13
11: */
12: public interface Element {
13: /**
14: * Return client stream
15: *
16: * @param outputstream
17: * server stream
18: * @return client stream
19: */
20: OutputStream get(OutputStream outputstream) throws IOException;
21:
22: /**
23: * Return element connections
24: *
25: * @return element connections
26: */
27: List<Connection> getConnections();
28:
29: /**
30: * Return element connection
31: *
32: * @return element connection
33: */
34: Connection getConnection();
35:
36: /**
37: * Add connection
38: */
39: void add(Connection connection);
40:
41: /**
42: * Remove connection
43: */
44: void remove(Connection connection);
45:
46: }
|