public abstract class AbstractSocketFactory extends Object implements SocketFactory, Configurable
Modifier and Type | Field and Description |
---|---|
protected org.slf4j.Logger |
logger |
Constructor and Description |
---|
AbstractSocketFactory() |
Modifier and Type | Method and Description |
---|---|
void |
configure(Configuration configuration) |
Socket |
createSocket(String host,
int port,
int timeout)
to ensure we throw the correct exception in case a timeout occurs we provide
a final implementation of this method here, delegate to subclass-specific implementations
and handle the correct conversion of the exception in one place.
|
protected abstract Socket |
doCreateSocket(String host,
int port,
int timeout) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createSocket, isSSL
public void configure(Configuration configuration) throws ConfigurationException
configure
in interface Configurable
ConfigurationException
public final Socket createSocket(String host, int port, int timeout) throws UnknownHostException, IOException
createSocket
in interface SocketFactory
host
- the host nameport
- the port numbertimeout
- the timeout value to be used in millisecondsIOException
UnknownHostException
protected abstract Socket doCreateSocket(String host, int port, int timeout) throws IOException, UnknownHostException
IOException
UnknownHostException
Copyright © 2017 JacORB. All rights reserved.