jgnash.net
Class ConnectionFactory

java.lang.Object
  extended by jgnash.net.ConnectionFactory

public class ConnectionFactory
extends java.lang.Object

Factory methods for setting network connection timeout and creating a URLConnection with timeout set correctly.

Version:
$Id$
Author:
Craig Cavanaugh

Field Summary
private static java.lang.String TIMEOUT
           
 
Constructor Summary
private ConnectionFactory()
           
 
Method Summary
static java.net.URLConnection getConnection(java.lang.String url)
           
private static java.net.URLConnection getConnection(java.net.URL url)
           
private static int getConnectionTimeout()
           
static void setConnectionTimeout(int seconds)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TIMEOUT

private static final java.lang.String TIMEOUT
See Also:
Constant Field Values
Constructor Detail

ConnectionFactory

private ConnectionFactory()
Method Detail

setConnectionTimeout

public static void setConnectionTimeout(int seconds)

getConnectionTimeout

private static int getConnectionTimeout()

getConnection

public static java.net.URLConnection getConnection(java.lang.String url)

getConnection

private static java.net.URLConnection getConnection(java.net.URL url)