com.atlassian.bamboo.repository.cvsimpl
Class CvsTimeoutSocketFactory

java.lang.Object
  extended by javax.net.SocketFactory
      extended by com.atlassian.bamboo.repository.cvsimpl.CvsTimeoutSocketFactory

@ThreadSafe
public class CvsTimeoutSocketFactory
extends SocketFactory

A socket factory for CVS that sets a timeout on each socket it creates. Can be easily generified as needed.


Constructor Summary
CvsTimeoutSocketFactory(int cvsSocketTimeoutMs)
           
 
Method Summary
 Socket createSocket()
           
 Socket createSocket(InetAddress address, int port)
           
 Socket createSocket(InetAddress address, int port, InetAddress clientAddress, int clientPort)
           
 Socket createSocket(String host, int port)
           
 Socket createSocket(String host, int port, InetAddress clientAddress, int clientPort)
           
static CvsTimeoutSocketFactory getInstance()
           
 
Methods inherited from class javax.net.SocketFactory
getDefault
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CvsTimeoutSocketFactory

public CvsTimeoutSocketFactory(int cvsSocketTimeoutMs)
Method Detail

createSocket

public Socket createSocket()
                    throws IOException
Overrides:
createSocket in class SocketFactory
Throws:
IOException

createSocket

public Socket createSocket(String host,
                           int port)
                    throws IOException,
                           UnknownHostException
Specified by:
createSocket in class SocketFactory
Throws:
IOException
UnknownHostException

createSocket

public Socket createSocket(InetAddress address,
                           int port)
                    throws IOException
Specified by:
createSocket in class SocketFactory
Throws:
IOException

createSocket

public Socket createSocket(String host,
                           int port,
                           InetAddress clientAddress,
                           int clientPort)
                    throws IOException,
                           UnknownHostException
Specified by:
createSocket in class SocketFactory
Throws:
IOException
UnknownHostException

createSocket

public Socket createSocket(InetAddress address,
                           int port,
                           InetAddress clientAddress,
                           int clientPort)
                    throws IOException
Specified by:
createSocket in class SocketFactory
Throws:
IOException

getInstance

public static CvsTimeoutSocketFactory getInstance()


Copyright © 2015 Atlassian Software Systems Pty Ltd. All rights reserved.