Class AbstractTwitterEndpoint
- java.lang.Object
-
- org.apache.camel.support.service.BaseService
-
- org.apache.camel.support.service.ServiceSupport
-
- org.apache.camel.support.DefaultEndpoint
-
- org.apache.camel.support.ScheduledPollEndpoint
-
- org.apache.camel.support.DefaultPollingEndpoint
-
- org.apache.camel.component.twitter.AbstractTwitterEndpoint
-
- All Implemented Interfaces:
AutoCloseable
,org.apache.camel.CamelContextAware
,TwitterEndpoint
,org.apache.camel.Endpoint
,org.apache.camel.IsSingleton
,org.apache.camel.Service
,org.apache.camel.ShutdownableService
,org.apache.camel.spi.HasId
,org.apache.camel.StatefulService
,org.apache.camel.SuspendableService
- Direct Known Subclasses:
TwitterDirectMessageEndpoint
,TwitterSearchEndpoint
,TwitterTimelineEndpoint
public abstract class AbstractTwitterEndpoint extends org.apache.camel.support.DefaultPollingEndpoint implements TwitterEndpoint
The base Twitter Endpoint.
-
-
Field Summary
Fields Modifier and Type Field Description static long
DEFAULT_CONSUMER_DELAY
-
Constructor Summary
Constructors Constructor Description AbstractTwitterEndpoint(String uri, AbstractTwitterComponent component, TwitterConfiguration properties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configureConsumer(org.apache.camel.Consumer consumer)
protected void
doStop()
Integer
getCount()
EndpointType
getEndpointType()
String
getLang()
String
getLocations()
Integer
getNumberOfPages()
TwitterConfiguration
getProperties()
long
getSinceId()
boolean
isFilterOld()
void
setCount(Integer count)
void
setDelay(long delay)
Milliseconds before the next poll.void
setFilterOld(boolean filterOld)
void
setLang(String lang)
void
setLocations(String locations)
void
setNumberOfPages(Integer numberOfPages)
void
setProperties(TwitterConfiguration properties)
void
setSinceId(long sinceId)
-
Methods inherited from class org.apache.camel.support.ScheduledPollEndpoint
configureProperties, configureScheduledPollConsumerProperties, doConfigureConsumer, doStart, getBackoffErrorThreshold, getBackoffIdleThreshold, getBackoffMultiplier, getDefaultDelay, getDelay, getInitialDelay, getPollStrategy, getRepeatCount, getRunLoggingLevel, getScheduledExecutorService, getScheduler, getSchedulerProperties, getTimeUnit, isGreedy, isSendEmptyMessageWhenIdle, isStartScheduler, isUseFixedDelay, setBackoffErrorThreshold, setBackoffIdleThreshold, setBackoffMultiplier, setGreedy, setInitialDelay, setPollStrategy, setRepeatCount, setRunLoggingLevel, setScheduledExecutorService, setScheduler, setSchedulerProperties, setSendEmptyMessageWhenIdle, setStartScheduler, setTimeUnit, setUseFixedDelay
-
Methods inherited from class org.apache.camel.support.DefaultEndpoint
configureExchange, configurePollingConsumer, createAsyncProducer, createEndpointUri, createExchange, createExchange, createPollingConsumer, doInit, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, isLenientProperties, isPollingConsumerBlockWhenFull, isPollingConsumerCopy, isSingleton, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setComponent, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerCopy, setPollingConsumerQueueSize, setProperties, toString
-
Methods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.camel.Endpoint
configureExchange, configureProperties, createAsyncProducer, createConsumer, createExchange, createExchange, createPollingConsumer, createProducer, getCamelContext, getEndpointBaseUri, getEndpointKey, getEndpointUri, getExchangePattern, isLenientProperties, isSingletonProducer, setCamelContext
-
-
-
-
Field Detail
-
DEFAULT_CONSUMER_DELAY
public static final long DEFAULT_CONSUMER_DELAY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AbstractTwitterEndpoint
public AbstractTwitterEndpoint(String uri, AbstractTwitterComponent component, TwitterConfiguration properties)
-
-
Method Detail
-
doStop
protected void doStop() throws Exception
- Overrides:
doStop
in classorg.apache.camel.support.ScheduledPollEndpoint
- Throws:
Exception
-
configureConsumer
public void configureConsumer(org.apache.camel.Consumer consumer) throws Exception
- Overrides:
configureConsumer
in classorg.apache.camel.support.ScheduledPollEndpoint
- Throws:
Exception
-
getProperties
public TwitterConfiguration getProperties()
- Specified by:
getProperties
in interfaceTwitterEndpoint
-
setProperties
public void setProperties(TwitterConfiguration properties)
-
getLocations
@ManagedAttribute public String getLocations()
-
setLocations
@ManagedAttribute public void setLocations(String locations)
-
setFilterOld
@ManagedAttribute public void setFilterOld(boolean filterOld)
-
isFilterOld
@ManagedAttribute public boolean isFilterOld()
-
setSinceId
@ManagedAttribute public void setSinceId(long sinceId)
-
getSinceId
@ManagedAttribute public long getSinceId()
-
setLang
@ManagedAttribute public void setLang(String lang)
-
getLang
@ManagedAttribute public String getLang()
-
setCount
@ManagedAttribute public void setCount(Integer count)
-
getCount
@ManagedAttribute public Integer getCount()
-
setNumberOfPages
@ManagedAttribute public void setNumberOfPages(Integer numberOfPages)
-
getNumberOfPages
@ManagedAttribute public Integer getNumberOfPages()
-
getEndpointType
public EndpointType getEndpointType()
- Specified by:
getEndpointType
in interfaceTwitterEndpoint
-
setDelay
public void setDelay(long delay)
Milliseconds before the next poll.- Overrides:
setDelay
in classorg.apache.camel.support.ScheduledPollEndpoint
-
-