- public ProvidedInterface[] getRunningInterfaces() {
- return _running.toArray(new ProvidedInterface[0]);
- }
-
- @Override
- public void stop() {
- doStop();
- if ( _running.size() > 0 ) {
- // programming error.
- throw new RuntimeException(getQualifiedName() + ": still services running after the stop call.");
- }
- _status = Status.STOPPED;
- }
-
- protected abstract void doStop();
-
- /**
- * Implementations must call this method to indicate that a running service has
- * been stopped.
- *
- * @param aService
- * Service.
- */
- protected final void removeInterface(
- ProvidedInterface aDescriptor) {
- LOG.info("Interface '" + getQualifiedName() + "." + aDescriptor.getName() + "' stopped.");
- _running.remove(aDescriptor);
- aDescriptor.publish(null);