01 /*
02 *
03 * Licensed to the Apache Software Foundation (ASF) under one
04 * or more contributor license agreements. See the NOTICE file
05 * distributed with this work for additional information
06 * regarding copyright ownership. The ASF licenses this file
07 * to you under the Apache License, Version 2.0 (the
08 * "License"); you may not use this file except in compliance
09 * with the License. You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 */
21 package org.apache.qpid.server.registry;
22
23 import java.util.Collection;
24 import java.net.InetSocketAddress;
25
26 import org.apache.commons.configuration.Configuration;
27 import org.apache.qpid.server.configuration.ServerConfiguration;
28 import org.apache.qpid.server.management.ManagedObjectRegistry;
29 import org.apache.qpid.server.plugins.PluginManager;
30 import org.apache.qpid.server.security.auth.manager.AuthenticationManager;
31 import org.apache.qpid.server.security.auth.database.PrincipalDatabaseManager;
32 import org.apache.qpid.server.security.access.ACLManager;
33 import org.apache.qpid.server.security.access.ACLPlugin;
34 import org.apache.qpid.server.virtualhost.VirtualHostRegistry;
35 import org.apache.mina.common.IoAcceptor;
36
37 public interface IApplicationRegistry
38 {
39 /**
40 * Initialise the application registry. All initialisation must be done in this method so that any components
41 * that need access to the application registry itself for initialisation are able to use it. Attempting to
42 * initialise in the constructor will lead to failures since the registry reference will not have been set.
43 */
44 void initialise() throws Exception;
45
46 /**
47 * Shutdown this Registry
48 * @throws Exception - //fixme needs to be made more specific
49 */
50 void close() throws Exception;
51
52 /**
53 * Get the low level configuration. For use cases where the configured object approach is not required
54 * you can get the complete configuration information.
55 * @return a Commons Configuration instance
56 */
57 ServerConfiguration getConfiguration();
58
59 ManagedObjectRegistry getManagedObjectRegistry();
60
61 PrincipalDatabaseManager getDatabaseManager();
62
63 AuthenticationManager getAuthenticationManager();
64
65 VirtualHostRegistry getVirtualHostRegistry();
66
67 ACLManager getAccessManager();
68
69 PluginManager getPluginManager();
70
71 /**
72 * Register any acceptors for this registry
73 * @param bindAddress The address that the acceptor has been bound with
74 * @param acceptor The acceptor in use
75 */
76 void addAcceptor(InetSocketAddress bindAddress, IoAcceptor acceptor);
77
78 }
|