1 package org.testng.remote; 2 3 import java.io.IOException; 4 import java.io.ObjectInputStream; 5 import java.io.ObjectOutputStream; 6 import java.net.Socket; 7 8 public class ConnectionInfo { 9 private Socket m_socket; 10 private ObjectInputStream m_ois; 11 private ObjectOutputStream m_oos; 12 getOis()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 getOos()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 setSocket(Socket s)27 public void setSocket(Socket s) { 28 m_socket = s; 29 } 30 getSocket()31 public Socket getSocket() { 32 return m_socket; 33 } 34 35 } 36