- java.lang.Object
-
- com.ericsson.otp.erlang.OtpSocketTransport
-
- All Implemented Interfaces:
OtpTransport
public class OtpSocketTransport extends Object implements OtpTransport
Default socket-based client transport- Author:
- Dmitriy Kargapolov
-
-
Constructor Summary
Constructors Constructor Description OtpSocketTransport(String addr, int port)OtpSocketTransport(InetAddress addr, int port)OtpSocketTransport(Socket s)Socket wrapping constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()InputStreamgetInputStream()OutputStreamgetOutputStream()
-
-
-
Constructor Detail
-
OtpSocketTransport
public OtpSocketTransport(String addr, int port) throws UnknownHostException, IOException
- Throws:
UnknownHostExceptionIOException- See Also:
Socket(String, int)
-
OtpSocketTransport
public OtpSocketTransport(InetAddress addr, int port) throws UnknownHostException, IOException
- Throws:
UnknownHostExceptionIOException- See Also:
Socket(InetAddress, int)
-
OtpSocketTransport
public OtpSocketTransport(Socket s)
Socket wrapping constructor- Parameters:
s- socket to wrap
-
-
Method Detail
-
getInputStream
public InputStream getInputStream() throws IOException
- Specified by:
getInputStreamin interfaceOtpTransport- Throws:
IOException- See Also:
Socket.getInputStream()
-
getOutputStream
public OutputStream getOutputStream() throws IOException
- Specified by:
getOutputStreamin interfaceOtpTransport- Throws:
IOException- See Also:
Socket.getOutputStream()
-
close
public void close() throws IOException- Specified by:
closein interfaceOtpTransport- Throws:
IOException- See Also:
Socket.close()
-
-