Created
April 11, 2012 15:49
-
-
Save lennartkoopmann/2360177 to your computer and use it in GitHub Desktop.
le cleanup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void registerInitializer(Initializer initializer) { | |
this.initializers.add(initializer); | |
} | |
@Override | |
public void run() { | |
... | |
// Call all registered initializers. | |
for (Initializer initializer : this.initializers) { | |
initializer.initialize(); | |
LOG.debug("Initialized: " + initializer.getClass().getSimpleName()); | |
} | |
... | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Le server object. This is where all the magic happens. | |
GraylogServer server = new GraylogServer(configuration); | |
// Register initializers. | |
server.registerInitializer(new SyslogServerInitializer(server, configuration)); | |
server.registerInitializer(new DroolsInitializer(server, configuration)); | |
server.registerInitializer(new HostCounterCacheInitializer(server)); | |
// Blocks until we shut down. | |
server.run(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment