|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.netbeans.lib.cvsclient.connection.AbstractConnection
org.netbeans.lib.cvsclient.connection.PServerConnection
public class PServerConnection
Implements a connection to a pserver. See the cvs documents for more information about different connection methods. PServer is popular where security is not an issue. For secure connections, consider using a kserver (Kerberos) or the GSSAPI.
Field Summary | |
---|---|
protected static java.lang.String |
AUTHENTICATION_FAILED_RESPONSE
A response indicating that the authorisation has failed. |
protected static java.lang.String |
AUTHENTICATION_SUCCEEDED_RESPONSE
A response indicating that authorisation has succeeded. |
static int |
DEFAULT_PORT
The default port number to use. |
protected java.lang.String |
encodedPassword
The password, encoded appropriately. |
protected java.lang.String |
hostName
The host to use. |
protected static java.lang.String |
OPEN_POSTAMBLE
The string that is sent at the end of the request to open a connection. |
protected static java.lang.String |
OPEN_PREAMBLE
The string that is sent at the beginning of the request to open a connection. |
protected int |
port
The port number to use. |
protected java.net.Socket |
socket
The socket used for the connection. |
protected javax.net.SocketFactory |
socketFactory
The socket factory that will be used to create sockets. |
protected java.lang.String |
userName
The user name to use. |
protected static java.lang.String |
VERIFY_POSTAMBLE
The string that is sent at the end of a verify request. |
protected static java.lang.String |
VERIFY_PREAMBLE
The string that is sent at the beginning of the request to verify a connection. |
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Methods inherited from class org.netbeans.lib.cvsclient.connection.AbstractConnection |
---|
getInputStream, getOutputStream, getRepository, setInputStream, setOutputStream, setRepository, verifyProtocol |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String OPEN_PREAMBLE
protected static final java.lang.String OPEN_POSTAMBLE
protected static final java.lang.String VERIFY_PREAMBLE
protected static final java.lang.String VERIFY_POSTAMBLE
protected static final java.lang.String AUTHENTICATION_SUCCEEDED_RESPONSE
protected static final java.lang.String AUTHENTICATION_FAILED_RESPONSE
protected java.lang.String userName
protected java.lang.String encodedPassword
public static final int DEFAULT_PORT
protected int port
protected java.lang.String hostName
protected java.net.Socket socket
protected javax.net.SocketFactory socketFactory
Constructor Detail |
---|
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.Method Detail |
---|
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 established
AuthenticationException
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 modifications
java.io.IOException
- if an error occurs modifying the streamspublic void modifyOutputStream(ConnectionModifier modifier) throws java.io.IOException
modifier
- the connection modifier that performs the modifications
java.io.IOException
- if an error occurs modifying the streamspublic boolean isOpen()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |