1package org.testng.remote; 2 3import java.io.IOException; 4import java.io.ObjectInputStream; 5import java.io.ObjectOutputStream; 6import java.net.Socket; 7 8public class ConnectionInfo { 9 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} 36