List of usage examples for org.apache.commons.net.nntp NNTPClient setSoTimeout
public void setSoTimeout(int timeout) throws SocketException
From source file:org.rssowl.contrib.internal.nntp.NewsGroupHandler.java
private void setTimeout(NNTPClient client, Map<Object, Object> properties) { /* Retrieve Connection Timeout from Properties if set */ int conTimeout = DEFAULT_CON_TIMEOUT; if (properties != null && properties.containsKey(IConnectionPropertyConstants.CON_TIMEOUT)) conTimeout = (Integer) properties.get(IConnectionPropertyConstants.CON_TIMEOUT); /* Socket Timeout - Max. time to wait for an answer */ try {//from w w w . jav a 2 s .c om client.setSoTimeout(conTimeout); } catch (SocketException e) { /* Ignore */ } }