Package com.adaptris.core
Interface ServiceCollection
- All Superinterfaces:
AdaptrisComponent
,Collection<Service>
,ComponentLifecycle
,ComponentLifecycleExtension
,ConfigComment
,EventHandlerAware
,Iterable<Service>
,List<Service>
,MessageEventGenerator
,Service
,StateManagedComponent
- All Known Implementing Classes:
BranchingServiceCollection
,CloneMessageServiceList
,JdbcServiceList
,ServiceCollectionImp
,ServiceList
,ServiceListBase
Defines behaviour common to collections of Service
s.
This class extends Service
and is thus a Service
itself. Implementations may iterate through the collection in order,
provide branching, etc.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addService
(Service service) Adds aService
to this collection.Returns aList
of theService
s in this collection.void
handleException
(Service service, AdaptrisMessage msg, Exception e) Handles any exceptions thrown from an embedded Service.Methods inherited from interface com.adaptris.core.AdaptrisComponent
getUniqueId
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface com.adaptris.core.ComponentLifecycle
close, init, start, stop
Methods inherited from interface com.adaptris.core.ComponentLifecycleExtension
prepare
Methods inherited from interface com.adaptris.core.ConfigComment
getComments, setComments
Methods inherited from interface com.adaptris.core.EventHandlerAware
registerEventHandler
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
Methods inherited from interface com.adaptris.core.MessageEventGenerator
createName, createQualifier, isTrackingEndpoint
Methods inherited from interface com.adaptris.core.Service
continueOnFailure, doService, enabled, isBranching, setUniqueId
Methods inherited from interface com.adaptris.core.StateManagedComponent
changeState, requestClose, requestInit, requestStart, requestStop, retrieveComponentState
-
Method Details
-
getServices
Returns a
List
of theService
s in this collection.- Returns:
- a
List
of theService
s in this collection
-
addService
Adds a
Service
to this collection.- Parameters:
service
- theService
to add- Throws:
CoreException
- wrapping any underlying Exception that may occur
-
handleException
Handles any exceptions thrown from an embedded Service.
- Parameters:
service
- service which threw the Exceptione
- the exception which was thrownmsg
- the message which caused the exception- Throws:
ServiceException
- wrapping the exception ifService.continueOnFailure()
is false
-