dk.statsbiblioteket.doms.summa.oai
Class Client
java.lang.Object
dk.statsbiblioteket.doms.summa.oai.Client
public class Client
- extends java.lang.Object
Client to send and receive oai Request
s and Response
s.
- Version:
- summaStorage-0.2 - build date 01/29/2007 11:57
- See Also:
Request
,
Response
Nested Class Summary |
private class |
Client.MonitoredInputStream
A special input stream that disconnects an underlying HttpURLConnection when closed. |
Field Summary |
private java.lang.String |
base
|
private Log |
log
|
Constructor Summary |
Client(java.lang.String oaiBaseUrl)
Create a new OAI client and configure it for a given oai provider. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
private final Log log
base
private java.lang.String base
Client
public Client(java.lang.String oaiBaseUrl)
- Create a new OAI client and configure it for a given oai provider.
- Parameters:
oaiBaseUrl
- the base url of the oai service. fx "http://localhost:8200/oaiprovider".
submit
public Response submit(Request rq)
throws java.io.IOException
- Send an OAI request to the configured oai service.
Closing the input stream of the returned
Response
will also disconnect the
underlying HttpURLConnection
.
- Parameters:
rq
-
- Returns:
-
- Throws:
java.io.IOException
getInputStream
private Client.MonitoredInputStream getInputStream(Request rq)
throws java.io.IOException
- Throws:
java.io.IOException
getIdentity
private IdentifyResponse getIdentity()
throws java.io.IOException
- Throws:
java.io.IOException