public class RemoteDeliverySocketFactory extends SocketFactory
It is used by RemoteDelivery in order to make possible to bind the client socket to a specific ip address.
This is not a nice solution because the ip address must be shared by all RemoteDelivery instances. It would be better to modify JavaMail (current version 1.3) to support a corresonding property, e.g. mail.smtp.bindAdress.
This used to not extend javax.net.SocketFactory descendant, because
But since James 2.3.0a1:
Note: Javamail 1.4 should correctly support mail.smtp.localaddr so we could probably get rid of this class and simply add that property to the Session.
Constructor and Description |
---|
RemoteDeliverySocketFactory() |
Modifier and Type | Method and Description |
---|---|
Socket |
createSocket()
the same as the similarly named javax.net.SocketFactory operation.
|
Socket |
createSocket(InetAddress host,
int port)
the same as the similarly named javax.net.SocketFactory operation.
|
Socket |
createSocket(InetAddress address,
int port,
InetAddress clientAddress,
int clientPort)
the same as the similarly named javax.net.SocketFactory operation.
|
Socket |
createSocket(String host,
int port)
the same as the similarly named javax.net.SocketFactory operation.
|
Socket |
createSocket(String host,
int port,
InetAddress clientHost,
int clientPort)
the same as the similarly named javax.net.SocketFactory operation.
|
static SocketFactory |
getDefault()
the same as the similarly named javax.net.SocketFactory operation.
|
public static SocketFactory getDefault()
public Socket createSocket() throws IOException
createSocket
in class SocketFactory
IOException
public Socket createSocket(String host, int port) throws IOException, UnknownHostException
createSocket
in class SocketFactory
IOException
UnknownHostException
public Socket createSocket(String host, int port, InetAddress clientHost, int clientPort) throws IOException, UnknownHostException
createSocket
in class SocketFactory
IOException
UnknownHostException
public Socket createSocket(InetAddress host, int port) throws IOException
createSocket
in class SocketFactory
IOException
public Socket createSocket(InetAddress address, int port, InetAddress clientAddress, int clientPort) throws IOException
createSocket
in class SocketFactory
IOException
Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.