public class PServerConnection extends AbstractConnection
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_PORT
The default port number to use.
|
Constructor and Description |
---|
PServerConnection()
Create an uninitialized PServerConnection.
|
PServerConnection(CVSRoot cvsRoot)
Create PServerConnection and setup it's properties from the supplied
CVSRoot object.
|
PServerConnection(CVSRoot cvsRoot,
javax.net.SocketFactory factory)
Create PServerConnection and setup it's properties from the supplied
CVSRoot object.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the connection with the server.
|
java.lang.String |
getEncodedPassword()
Get the encoded password.
|
java.lang.String |
getHostName()
Get the host name to use.
|
int |
getPort()
Get the port number to use.
|
java.lang.String |
getUserName()
Get the username.
|
boolean |
isOpen()
Returns true to indicate that the connection was successfully established.
|
void |
modifyInputStream(ConnectionModifier modifier)
Modify the underlying inputstream.
|
void |
modifyOutputStream(ConnectionModifier modifier)
Modify the underlying outputstream.
|
void |
open()
Authenticate with the server and open a channel of communication with
the server.
|
void |
setEncodedPassword(java.lang.String encodedPassword)
Set the encoded password.
|
void |
setHostName(java.lang.String hostName)
Get the host name to use.
|
void |
setPort(int port)
Set the port number to use.
|
void |
setUserName(java.lang.String userName)
Set the userName.
|
void |
verify()
Authenticate with the server.
|
getInputStream, getOutputStream, getRepository, setRepository
public static final int DEFAULT_PORT
public PServerConnection()
public PServerConnection(CVSRoot cvsRoot)
java.lang.IllegalArgumentException
- if the cvsRoot does not represent pserver
connection type.public PServerConnection(CVSRoot cvsRoot, javax.net.SocketFactory factory)
java.lang.IllegalArgumentException
- if the cvsRoot does not represent pserver
connection type.public void verify() throws AuthenticationException
AuthenticationException
- if the connection with the server
cannot be establishedpublic void open() throws AuthenticationException, CommandAbortedException
AutenticationException
- if the connection with the server
cannot be establishedAuthenticationException
CommandAbortedException
public java.lang.String getUserName()
public void setUserName(java.lang.String userName)
name
- the userNamepublic java.lang.String getEncodedPassword()
public void setEncodedPassword(java.lang.String encodedPassword)
password
- the encoded password to use for authenticationpublic int getPort()
public void setPort(int port)
thePort
- the port number to use. If you do not set this, 2401
is used by default for pserver.public java.lang.String getHostName()
public void setHostName(java.lang.String hostName)
theHostName
- the host name of the server to connect to. If you
do not set this, localhost is used by default for pserver.public void close() throws java.io.IOException
java.io.IOException
public void modifyInputStream(ConnectionModifier modifier) throws java.io.IOException
modifier
- the connection modifier that performs the modificationsjava.io.IOException
- if an error occurs modifying the streamspublic void modifyOutputStream(ConnectionModifier modifier) throws java.io.IOException
modifier
- the connection modifier that performs the modificationsjava.io.IOException
- if an error occurs modifying the streamspublic boolean isOpen()