issrg.utils.webdav
Interface WebDAVSocket

All Known Implementing Classes:
WebDAVSocketHTTP, WebDAVSocketHTTPS

public interface WebDAVSocket

This interface provides the steps required for a successful HTTP transaction. 1. A HTTP client opens a connection. 2. Sends a request message to a HTTP server and the server returns a response message, containing the requested data or an error. 3. Closes the connection.

Version:
19/03/2007
Author:
Sean Antony

Method Summary
 void close()
          3.
 void open(java.lang.String host, int port)
          1.
 byte[] sendAndReceive(byte[] message)
          2.
 java.lang.String sendAndReceive(java.lang.String message)
          2.
 

Method Detail

open

void open(java.lang.String host,
          int port)
          throws java.io.IOException
1. A HTTP client opens a connection.

Parameters:
host -
port -
Throws:
java.io.IOException

sendAndReceive

java.lang.String sendAndReceive(java.lang.String message)
                                throws java.io.IOException
2. Sends a request message to a HTTP server and the server returns a response message, containing the requested data or an error.

Parameters:
message - client request message
Returns:
server response message
Throws:
java.io.IOException

sendAndReceive

byte[] sendAndReceive(byte[] message)
                      throws java.io.IOException
2. Sends a request message to a HTTP server and the server returns a response message, containing the requested data or an error.

Parameters:
message - client request message in binary
Returns:
server response message in binary
Throws:
java.io.IOException

close

void close()
           throws java.io.IOException
3. Closes the connection.

Throws:
java.io.IOException