01: package org.testng.remote;
02:
03: import java.io.IOException;
04: import java.io.ObjectInputStream;
05: import java.io.ObjectOutputStream;
06: import java.net.Socket;
07:
08: public class ConnectionInfo {
09: private Socket m_socket;
10: private ObjectInputStream m_ois;
11: private ObjectOutputStream m_oos;
12:
13: public ObjectInputStream getOis() throws IOException {
14: if (m_ois == null) {
15: m_ois = new ObjectInputStream(m_socket.getInputStream());
16: }
17: return m_ois;
18: }
19:
20: public ObjectOutputStream getOos() throws IOException {
21: if (m_oos == null) {
22: m_oos = new ObjectOutputStream(m_socket.getOutputStream());
23: }
24: return m_oos;
25: }
26:
27: public void setSocket(Socket s) {
28: m_socket = s;
29: }
30:
31: public Socket getSocket() {
32: return m_socket;
33: }
34:
35: }
|