T - configuration typepublic class OrientServerBundle<T extends io.dropwizard.Configuration & HasOrientServerConfiguration>
extends java.lang.Object
implements io.dropwizard.ConfiguredBundle<T>
HasOrientConfiguration, which provides orient configuration object.
In configuration (yaml) orient server configuration (orient own config) could be defined as reference to xml file (orient default format) or directly in main config (by converting xml to yaml). Server startup could be disabled by setting 'start: false' in config.
Additionally registers console command.
Important note: orient object database conflicts with hibernate-validator, because orient brings jpa classes, which activates hibernate lazy properties checks in validator. Bundle implicitly fixes this by overriding TraversableResolver. It's completely safe for application if you don't use hibernate.
NOTE: server will not start when console command called, because dropwizard will not run managed objects this time (only server command triggers managed objects lifecycle). But plocal connections still could be used. Also, if server already started, then you can use remote connections.| Constructor and Description |
|---|
OrientServerBundle(java.lang.Class<T> configClass) |
| Modifier and Type | Method and Description |
|---|---|
void |
initialize(io.dropwizard.setup.Bootstrap<?> bootstrap) |
void |
run(T configuration,
io.dropwizard.setup.Environment environment) |
public OrientServerBundle(java.lang.Class<T> configClass)
configClass - configuration classpublic void initialize(io.dropwizard.setup.Bootstrap<?> bootstrap)
initialize in interface io.dropwizard.ConfiguredBundle<T extends io.dropwizard.Configuration & HasOrientServerConfiguration>public void run(T configuration, io.dropwizard.setup.Environment environment) throws java.lang.Exception
run in interface io.dropwizard.ConfiguredBundle<T extends io.dropwizard.Configuration & HasOrientServerConfiguration>java.lang.Exception