Package com.linecorp.centraldogma.server
Class CentralDogma
java.lang.Object
com.linecorp.centraldogma.server.CentralDogma
- All Implemented Interfaces:
AutoCloseable
Central Dogma server.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns the primary port of the server.Returns the ports of the server.void
close()
config()
Returns the configuration of the server.static CentralDogma
Creates a new instance from the given configuration file.Returns theMeterRegistry
that contains the stats related with the server.Returns theMirroringService
of the server.plugins
(PluginTarget target) Returns thePlugin
s which have been loaded.Returns theProjectManager
of 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
CentralDogmaConfig
instance which is used for configuring thisCentralDogma
.
-
activePort
Returns the primary port of the server.- Returns:
- the primary
ServerPort
if the server is started.Optional.empty()
otherwise.
-
activePorts
Returns the ports of the server.- Returns:
- the
Map
which contains the pairs of localInetSocketAddress
andServerPort
is the server is started.Optional.empty()
otherwise.
-
projectManager
Returns theProjectManager
of the server if the server is started.null
is returned, otherwise. -
mirroringService
Returns theMirroringService
of the server.- Returns:
- the
MirroringService
if the server is started and mirroring is enabled.null
otherwise.
-
plugins
Returns thePlugin
s which have been loaded.- Parameters:
target
- thePluginTarget
of thePlugin
s to be returned
-
meterRegistry
Returns theMeterRegistry
that 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:
close
in interfaceAutoCloseable
-