Update HeadersAware*WebServiceConnection to be a WebServiceConnection

Closes gh-1510
This commit is contained in:
Stéphane Nicoll
2025-03-26 17:07:31 +01:00
parent 1cc0807d74
commit 8336f3d02b
2 changed files with 12 additions and 11 deletions

View File

@@ -20,23 +20,23 @@ import java.io.IOException;
import java.util.Iterator;
/**
* Interface to define access to header information for certain
* {@link WebServiceConnection} implementations.
* Sub-interface of {@link WebServiceConnection} that is aware of request headers and can
* define response headers.
*
* @author Greg Turnquist
* @since 2.3
*/
public interface HeadersAwareReceiverWebServiceConnection {
public interface HeadersAwareReceiverWebServiceConnection extends WebServiceConnection {
/**
* Returns an iteration over all the header names this request contains. Returns an
* Return an iteration over all the header names the request contains. Returns an
* empty {@code Iterator} if there are no headers.
*/
Iterator<String> getRequestHeaderNames() throws IOException;
/**
* Returns an iteration over all the string values of the specified header. Returns an
* empty {@code Iterator} if there are no headers of the specified name.
* Return an iteration over all the string values of the specified request header.
* Return an empty {@code Iterator} if there is no header of the specified name.
*/
Iterator<String> getRequestHeaders(String name) throws IOException;

View File

@@ -20,22 +20,23 @@ import java.io.IOException;
import java.util.Iterator;
/**
* Specialization of {@link WebServiceConnection} that is able to manage headers.
* Sub-interface of {@link WebServiceConnection} that is aware of response headers and can
* define request headers.
*
* @author Greg Turnquist
* @since 2.3
*/
public interface HeadersAwareSenderWebServiceConnection {
public interface HeadersAwareSenderWebServiceConnection extends WebServiceConnection {
/**
* Returns an iteration over all the header names this request contains. Returns an
* Return an iteration over all the header names the response contains. Returns an
* empty {@code Iterator} if there are no headers.
*/
Iterator<String> getResponseHeaderNames() throws IOException;
/**
* Returns an iteration over all the string values of the specified header. Returns an
* empty {@code Iterator} if there are no headers of the specified name.
* Return an iteration over all the string values of the specified response header.
* Return an empty {@code Iterator} if there is no header of the specified name.
*/
Iterator<String> getResponseHeaders(String name) throws IOException;