org.netbeans.lib.cvsclient.connection
Class ConnectionFactory

java.lang.Object
  extended by org.netbeans.lib.cvsclient.connection.ConnectionFactory

public class ConnectionFactory
extends Object

Simple class for managing the mapping from CVSROOT specifications to Connection classes.

Author:
Gerrit Riessen, OAR Development AG, Rami Ojares, Elisa Internet Oy

Constructor Summary
protected ConnectionFactory()
          Protected Constructor
 
Method Summary
static Connection getConnection(CVSRoot root)
          Returns a Connection object to handle the specific CVSRoot specification.
static Connection getConnection(String cvsRoot)
          Returns a Connection object to handle the specific CVSRoot specification.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionFactory

protected ConnectionFactory()
Protected Constructor

Method Detail

getConnection

public static Connection getConnection(String cvsRoot)
                                throws IllegalArgumentException
Returns a Connection object to handle the specific CVSRoot specification. This returns null if not suitable connection was found. If the return value is an instance of the PServerConnection class, then the encoded password needs to be set if not defined in the CVSRoot. This is left up to the client to set.

Throws:
IllegalArgumentException

getConnection

public static Connection getConnection(CVSRoot root)
                                throws IllegalArgumentException
Returns a Connection object to handle the specific CVSRoot specification. This returns null if not suitable connection was found. If the return value is an instance of the PServerConnection class, then the encoded password needs to be set if not defined in the CVSRoot. This is left up to the client to set.

Throws:
IllegalArgumentException


Copyright © 2011. All Rights Reserved.