Class CentralDogma
java.lang.Object
com.linecorp.centraldogma.server.CentralDogma
- All Implemented Interfaces:
AutoCloseable
-
Method Summary
Modifier and TypeMethodDescription@Nullable ServerPortReturns the primary port of the server.Returns the ports of the server.voidclose()config()Returns the configuration of the server.Returns theEncryptionStorageManagerof the server.static CentralDogmaCreates a new instance from the given configuration file.Returns theMeterRegistrythat contains the stats related with the server.@Nullable MirroringServiceReturns theMirroringServiceof the server.plugins(PluginTarget target) Returns thePlugins which have been loaded.@Nullable ProjectManagerReturns theProjectManagerof the server if the server is started.start()Starts the server.stop()Stops the server.
-
Method Details
-
forConfig
Creates a new instance from the given configuration file.- Throws:
IOException- if failed to load the configuration from the specified file
-
config
Returns the configuration of the server.- Returns:
- the
CentralDogmaConfiginstance which is used for configuring thisCentralDogma.
-
activePort
Returns the primary port of the server.- Returns:
- the primary
ServerPortif the server is started.Optional.empty()otherwise.
-
activePorts
Returns the ports of the server.- Returns:
- the
Mapwhich contains the pairs of localInetSocketAddressandServerPortis the server is started.Optional.empty()otherwise.
-
projectManager
Returns theProjectManagerof the server if the server is started.nullis returned, otherwise. -
encryptionStorageManager
Returns theEncryptionStorageManagerof the server. -
mirroringService
Returns theMirroringServiceof the server.- Returns:
- the
MirroringServiceif the server is started and mirroring is enabled.nullotherwise.
-
plugins
Returns thePlugins which have been loaded.- Parameters:
target- thePluginTargetof thePlugins to be returned
-
meterRegistry
Returns theMeterRegistrythat contains the stats related with the server. -
start
Starts the server. -
stop
Stops the server. This method does nothing if the server is stopped already. -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-