|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hibernate.service.ServiceRegistryBuilder
public class ServiceRegistryBuilder
Builder for standard ServiceRegistry
instances.
StandardServiceRegistryImpl
,
BootstrapServiceRegistryBuilder
Field Summary | |
---|---|
static String |
DEFAULT_CFG_RESOURCE_NAME
|
Constructor Summary | |
---|---|
ServiceRegistryBuilder()
Create a default builder |
|
ServiceRegistryBuilder(BootstrapServiceRegistry bootstrapServiceRegistry)
Create a builder with the specified bootstrap services. |
Method Summary | |
---|---|
ServiceRegistryBuilder |
addInitiator(BasicServiceInitiator initiator)
Adds a service initiator. |
ServiceRegistryBuilder |
addService(Class serviceRole,
Service service)
Adds a user-provided service |
ServiceRegistryBuilder |
applySetting(String settingName,
Object value)
Apply a setting value |
ServiceRegistryBuilder |
applySettings(Map settings)
Apply a groups of setting values |
ServiceRegistry |
buildServiceRegistry()
Build the service registry accounting for all settings and service initiators and services. |
ServiceRegistryBuilder |
configure()
Read setting information from an XML file using the standard resource location |
ServiceRegistryBuilder |
configure(String resourceName)
Read setting information from an XML file using the named resource location |
static void |
destroy(ServiceRegistry serviceRegistry)
Destroy a service registry. |
ServiceRegistryBuilder |
loadProperties(String resourceName)
Read settings from a Properties file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DEFAULT_CFG_RESOURCE_NAME
Constructor Detail |
---|
public ServiceRegistryBuilder()
public ServiceRegistryBuilder(BootstrapServiceRegistry bootstrapServiceRegistry)
bootstrapServiceRegistry
- Provided bootstrap registry to use.Method Detail |
---|
public ServiceRegistryBuilder loadProperties(String resourceName)
Properties
file. Differs from configure()
and configure(String)
in that here we read a Properties
file while for configure()
we read the XML variant.
resourceName
- The name by which to perform a resource look up for the properties file.
configure()
,
configure(String)
public ServiceRegistryBuilder configure()
DEFAULT_CFG_RESOURCE_NAME
,
configure(String)
,
loadProperties(String)
public ServiceRegistryBuilder configure(String resourceName)
resourceName
- The named resource
loadProperties(String)
public ServiceRegistryBuilder applySetting(String settingName, Object value)
settingName
- The name of the settingvalue
- The value to use.
public ServiceRegistryBuilder applySettings(Map settings)
settings
- The incoming settings to apply
public ServiceRegistryBuilder addInitiator(BasicServiceInitiator initiator)
initiator
- The initiator to be added
public ServiceRegistryBuilder addService(Class serviceRole, Service service)
serviceRole
- The role of the service being addedservice
- The service implementation
public ServiceRegistry buildServiceRegistry()
public static void destroy(ServiceRegistry serviceRegistry)
serviceRegistry
- The registry to be closed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |