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

public interface ServiceCollection extends Service, EventHandlerAware, List<Service>

Defines behaviour common to collections of Services. This class extends Service and is thus a Service itself. Implementations may iterate through the collection in order, provide branching, etc.

  • Method Details

    • getServices

      List<Service> getServices()

      Returns a List of the Services in this collection.

      Returns:
      a List of the Services in this collection
    • addService

      void addService(Service service) throws CoreException

      Adds a Service to this collection.

      Parameters:
      service - the Service to add
      Throws:
      CoreException - wrapping any underlying Exception that may occur
    • handleException

      void handleException(Service service, AdaptrisMessage msg, Exception e) throws ServiceException

      Handles any exceptions thrown from an embedded Service.

      Parameters:
      service - service which threw the Exception
      e - the exception which was thrown
      msg - the message which caused the exception
      Throws:
      ServiceException - wrapping the exception if Service.continueOnFailure() is false