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 javax.net.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
 java.net.Socket createSocket()
           
 java.net.Socket createSocket(java.net.InetAddress address, int port)
           
 java.net.Socket createSocket(java.net.InetAddress address, int port, java.net.InetAddress clientAddress, int clientPort)
           
 java.net.Socket createSocket(java.lang.String host, int port)
           
 java.net.Socket createSocket(java.lang.String host, int port, java.net.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 java.net.Socket createSocket()
                             throws java.io.IOException
Overrides:
createSocket in class javax.net.SocketFactory
Throws:
java.io.IOException

createSocket

public java.net.Socket createSocket(java.lang.String host,
                                    int port)
                             throws java.io.IOException,
                                    java.net.UnknownHostException
Specified by:
createSocket in class javax.net.SocketFactory
Throws:
java.io.IOException
java.net.UnknownHostException

createSocket

public java.net.Socket createSocket(java.net.InetAddress address,
                                    int port)
                             throws java.io.IOException
Specified by:
createSocket in class javax.net.SocketFactory
Throws:
java.io.IOException

createSocket

public java.net.Socket createSocket(java.lang.String host,
                                    int port,
                                    java.net.InetAddress clientAddress,
                                    int clientPort)
                             throws java.io.IOException,
                                    java.net.UnknownHostException
Specified by:
createSocket in class javax.net.SocketFactory
Throws:
java.io.IOException
java.net.UnknownHostException

createSocket

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

getInstance

public static CvsTimeoutSocketFactory getInstance()


Copyright © 2010 Atlassian. All Rights Reserved.