}
}
public ContentExchange stream(ContentExchange ex, Symbol... symbols) throws ModelException
{
OAuthConsumer consumer = new JettyOAuthConsumer(ForemanConstants.API_KEY.toString(), ForemanConstants.API_SECRET.toString());
consumer.setTokenWithSecret(ForemanConstants.ACCESS_TOKEN.toString(), ForemanConstants.ACCESS_TOKEN_SECRET.toString());
ex.setMethod(Verb.GET.name());
ex.setURL(APICall.getStreamingQuote(ResponseFormat.XML) + getParameters(symbols));
// sign the request
try
{
consumer.sign(ex);
client.send(ex);
}
catch (IOException | OAuthMessageSignerException | OAuthExpectationFailedException | OAuthCommunicationException e)
{
throw new ModelException("Sent Exchange to Client", e);