org.apache.camel
Interface IsSingleton
- All Known Subinterfaces:
- BrowsableEndpoint, Endpoint, Producer
- All Known Implementing Classes:
- BeanEndpoint, BeanLanguage, BrowseEndpoint, CollectionProducer, ConstantLanguage, DataSetEndpoint, DefaultAsyncProducer, DefaultEndpoint, DefaultPollingEndpoint, DefaultProducer, DirectEndpoint, DirectProducer, DirectVmEndpoint, DirectVmProducer, FileEndpoint, FileLanguage, GenericFileEndpoint, GenericFileProducer, HeaderLanguage, InterceptSendToEndpoint, LanguageEndpoint, LanguageProducer, LogEndpoint, LogProducer, MockEndpoint, ProcessorEndpoint, PropertyLanguage, RefLanguage, ResourceEndpoint, ScheduledPollEndpoint, SedaEndpoint, SedaProducer, SimpleLanguage, SynchronousDelegateProducer, TestEndpoint, TimerEndpoint, TokenizeLanguage, UnitOfWorkProducer, XPathLanguage, XsltEndpoint
public interface IsSingleton
Used for defining if a given class is singleton or not. If the class is a singleton,
then a single instance will be shared (and hence should be treated as immutable and
be used in a thread-safe manner.)
This interface is not implemented as a marker interface (i.e., it's necessary to read
isSingleton() instead of instanceof(IsSingleton)). This allows for subclasses to have
a singleton status different from a parent and for objects to have this value dynamically
changed.
- Version:
Method Summary |
boolean |
isSingleton()
Whether this class supports being singleton or not. |
isSingleton
boolean isSingleton()
- Whether this class supports being singleton or not.
- Returns:
- true to be a single shared instance, false to create new instances.
Apache CAMEL