@Path(value="/twitter") @ApplicationScoped public class CamelResource extends Object
| Modifier and Type | Field and Description |
|---|---|
(package private) org.apache.camel.ConsumerTemplate |
consumerTemplate |
(package private) org.apache.camel.ProducerTemplate |
producerTemplate |
(package private) String |
twitterUserName |
| Constructor and Description |
|---|
CamelResource() |
| Modifier and Type | Method and Description |
|---|---|
String |
getDirectmessages() |
String |
getTimeline(String sinceId) |
javax.ws.rs.core.Response |
postDirectmessage(String message) |
javax.ws.rs.core.Response |
postTweet(String message) |
String |
search(String keywords) |
String twitterUserName
@Inject org.apache.camel.ProducerTemplate producerTemplate
@Inject org.apache.camel.ConsumerTemplate consumerTemplate
@Path(value="/timeline") @GET @Produces(value="text/plain") public String getTimeline(@QueryParam(value="sinceId") String sinceId)
@Path(value="/timeline") @POST @Consumes(value="text/plain") @Produces(value="text/plain") public javax.ws.rs.core.Response postTweet(String message) throws Exception
Exception@Path(value="/search") @GET @Produces(value="text/plain") public String search(@QueryParam(value="keywords") String keywords)
@Path(value="/directmessage") @GET @Produces(value="text/plain") public String getDirectmessages()
Copyright © 2019–2020 The Apache Software Foundation. All rights reserved.