Package edu.byu.hbll.box.client
Class AbstractHttpBoxClient
java.lang.Object
edu.byu.hbll.box.client.AbstractHttpBoxClient
- All Implemented Interfaces:
BoxClient
- Direct Known Subclasses:
HttpBoxClient
A client for communicating with Box through it's web api.
- Author:
- Charles Draper
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Represents an http response from a box documents enpoint. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionCollects and returns all documents found according to the given query.Returns documents found according to the given query in the form of anIterable
.getUri()
Returns the base uri for the box.protected abstract InputStream
Sends the request to the Box server and returns the response as an input stream.
-
Constructor Details
-
AbstractHttpBoxClient
Creates a new client.- Parameters:
uri
- the base uri of the box source (eg, http://localhost:8080/app/box)
-
-
Method Details
-
collect
Description copied from interface:BoxClient
Collects and returns all documents found according to the given query. -
find
Description copied from interface:BoxClient
Returns documents found according to the given query in the form of anIterable
. -
getUri
Returns the base uri for the box.- Returns:
- the uri
-
send
Sends the request to the Box server and returns the response as an input stream. This can be overridden by subclasses that require different HTTP clients. The input stream will be closed here.- Parameters:
uri
- the full uri to send to box for the query- Returns:
- the response body as an
InputStream
-