Package jade.mtp.http
Class HTTPSocketFactory
- java.lang.Object
-
- jade.mtp.http.HTTPSocketFactory
-
public class HTTPSocketFactory extends Object
Singleton class for obtaining sockets. HTTP MTP calls methods use this class every time that a socket is needed.- Author:
- Joan Ametller Esquerra
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigure(Profile profile, HTTPAddress hta)ServerSocketcreateServerSocket(String interfaceAddress, int port)SocketcreateSocket(String host, int port)SocketcreateSocket(String host, int port, InetAddress dest, int outport)static HTTPSocketFactorygetInstance()
-
-
-
Method Detail
-
getInstance
public static HTTPSocketFactory getInstance()
-
configure
public void configure(Profile profile, HTTPAddress hta) throws Exception
- Throws:
Exception
-
createSocket
public Socket createSocket(String host, int port) throws IOException
- Throws:
IOException
-
createSocket
public Socket createSocket(String host, int port, InetAddress dest, int outport) throws IOException
- Throws:
IOException
-
createServerSocket
public ServerSocket createServerSocket(String interfaceAddress, int port) throws IOException
- Throws:
IOException
-
-