Class HTTPConnection
java.lang.Object
org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection
- All Implemented Interfaces:
IHTTPConnection
- Version:
- 1.3
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
private static final DefaultHandler
private byte[]
private HTTPAuthentication
private String
private SVNURL
private InputStream
private boolean
private boolean
private boolean
private boolean
private HTTPSSLKeyManager
private HTTPStatus
private SVNAuthentication
private boolean
private long
private OutputStream
private HTTPAuthentication
private SVNRepository
private int
private SAXParser
private Socket
private File
private TrustManager
private static EntityResolver
private static SAXParserFactory
private static final int
-
Constructor Summary
ConstructorsConstructorDescriptionHTTPConnection
(SVNRepository repository, String charset, File spoolDirectory, boolean spoolAll) -
Method Summary
Modifier and TypeMethodDescriptionvoid
private void
void
close()
private String
composeRealm
(String realm) private void
connect
(HTTPSSLKeyManager keyManager, TrustManager trustManager, ISVNProxyManager proxyManager) private InputStream
createInputStream
(HTTPHeader readHeader, InputStream is) private HTTPSSLKeyManager
static SAXParserFactory
private void
finishResponse
(HTTPRequest request) private byte[]
getHost()
private InputStream
private OutputStream
private char[]
getProxyPasswordValue
(ISVNProxyManager proxyManager) private static SAXParserFactory
private static boolean
hasToCloseConnection
(HTTPHeader header) private boolean
private SVNErrorMessage
readData
(InputStream is, String method, String path, DefaultHandler handler) readData
(HTTPRequest request, OutputStream dst) readData
(HTTPRequest request, String method, String path, DefaultHandler handler) readError
(HTTPRequest request, String method, String path) void
readHeader
(HTTPRequest request) request
(String method, String path, HTTPHeader header, InputStream body, int ok1, int ok2, OutputStream dst, DefaultHandler handler) request
(String method, String path, HTTPHeader header, InputStream body, int ok1, int ok2, OutputStream dst, DefaultHandler handler, SVNErrorMessage context) request
(String method, String path, HTTPHeader header, StringBuffer body, int ok1, int ok2, OutputStream dst, DefaultHandler handler) request
(String method, String path, HTTPHeader header, StringBuffer body, int ok1, int ok2, OutputStream dst, DefaultHandler handler, SVNErrorMessage context) void
sendData
(byte[] body) void
sendData
(InputStream source, long length) void
setSpoolAll
(boolean spoolAll) void
setSpoolDirectory
(File spoolDirectory) void
setSpoolResponse
(boolean spoolResponse) void
skipData
(HTTPRequest request)
-
Field Details
-
DEFAULT_SAX_HANDLER
-
NO_ENTITY_RESOLVER
-
requestAttempts
private static final int requestAttempts -
DEFAULT_HTTP_TIMEOUT
private static final int DEFAULT_HTTP_TIMEOUT- See Also:
-
ourSAXParserFactory
-
emptyHeader
-
myBuffer
private byte[] myBuffer -
mySAXParser
-
myHost
-
myOutputStream
-
myInputStream
-
mySocket
-
myRepository
-
myIsSecured
private boolean myIsSecured -
myIsProxied
private boolean myIsProxied -
myLogSSLParams
private boolean myLogSSLParams -
myLastValidAuth
-
myChallengeCredentials
-
myProxyAuthentication
-
myIsSpoolResponse
private boolean myIsSpoolResponse -
myTrustManager
-
myKeyManager
-
myCharset
-
myIsSpoolAll
private boolean myIsSpoolAll -
mySpoolDirectory
-
myNextRequestTimeout
private long myNextRequestTimeout -
myRequestCount
private int myRequestCount -
myLastStatus
-
-
Constructor Details
-
HTTPConnection
public HTTPConnection(SVNRepository repository, String charset, File spoolDirectory, boolean spoolAll) throws SVNException - Throws:
SVNException
-
-
Method Details
-
getLastStatus
- Specified by:
getLastStatus
in interfaceIHTTPConnection
-
getHost
-
connect
private void connect(HTTPSSLKeyManager keyManager, TrustManager trustManager, ISVNProxyManager proxyManager) throws IOException, SVNException - Throws:
IOException
SVNException
-
getProxyPasswordValue
-
readHeader
- Throws:
IOException
-
readError
-
sendData
- Throws:
IOException
-
sendData
- Throws:
IOException
-
getLastValidCredentials
- Specified by:
getLastValidCredentials
in interfaceIHTTPConnection
-
clearAuthenticationCache
public void clearAuthenticationCache()- Specified by:
clearAuthenticationCache
in interfaceIHTTPConnection
-
clearLastValidAuth
private void clearLastValidAuth() -
request
public HTTPStatus request(String method, String path, HTTPHeader header, StringBuffer body, int ok1, int ok2, OutputStream dst, DefaultHandler handler) throws SVNException - Specified by:
request
in interfaceIHTTPConnection
- Throws:
SVNException
-
request
public HTTPStatus request(String method, String path, HTTPHeader header, StringBuffer body, int ok1, int ok2, OutputStream dst, DefaultHandler handler, SVNErrorMessage context) throws SVNException - Specified by:
request
in interfaceIHTTPConnection
- Throws:
SVNException
-
request
public HTTPStatus request(String method, String path, HTTPHeader header, InputStream body, int ok1, int ok2, OutputStream dst, DefaultHandler handler) throws SVNException - Specified by:
request
in interfaceIHTTPConnection
- Throws:
SVNException
-
request
public HTTPStatus request(String method, String path, HTTPHeader header, InputStream body, int ok1, int ok2, OutputStream dst, DefaultHandler handler, SVNErrorMessage context) throws SVNException - Specified by:
request
in interfaceIHTTPConnection
- Throws:
SVNException
-
composeRealm
-
isClearCredentialsOnClose
-
createKeyManager
-
readData
- Throws:
IOException
-
readData
public SVNErrorMessage readData(HTTPRequest request, String method, String path, DefaultHandler handler) throws IOException - Throws:
IOException
-
readData
private SVNErrorMessage readData(InputStream is, String method, String path, DefaultHandler handler) throws FactoryConfigurationError, UnsupportedEncodingException, IOException -
skipData
- Throws:
IOException
-
close
public void close()- Specified by:
close
in interfaceIHTTPConnection
-
getBuffer
private byte[] getBuffer() -
getInputStream
- Throws:
IOException
-
getOutputStream
- Throws:
IOException
-
finishResponse
-
hasToCloseConnection
-
createInputStream
- Throws:
IOException
-
getSAXParserFactory
- Throws:
FactoryConfigurationError
-
createSAXParserFactory
-
setSpoolResponse
public void setSpoolResponse(boolean spoolResponse) - Specified by:
setSpoolResponse
in interfaceIHTTPConnection
-
setSpoolAll
public void setSpoolAll(boolean spoolAll) -
setSpoolDirectory
-