projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
🎨 Add container for new posts/replies
[Sone.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
sone
/
main
/
SonePlugin.java
diff --git
a/src/main/java/net/pterodactylus/sone/main/SonePlugin.java
b/src/main/java/net/pterodactylus/sone/main/SonePlugin.java
index
91f21eb
..
82ab065
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/main/SonePlugin.java
+++ b/
src/main/java/net/pterodactylus/sone/main/SonePlugin.java
@@
-1,5
+1,5
@@
/*
/*
- * Sone - SonePlugin.java - Copyright © 2010–20
19
David Roden
+ * Sone - SonePlugin.java - Copyright © 2010–20
20
David Roden
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@
-42,7
+42,6
@@
import com.google.common.annotations.*;
import com.google.common.eventbus.*;
import com.google.common.cache.*;
import com.google.inject.*;
import com.google.common.eventbus.*;
import com.google.common.cache.*;
import com.google.inject.*;
-import com.google.inject.Module;
import com.google.inject.name.*;
import kotlin.jvm.functions.*;
import com.google.inject.name.*;
import kotlin.jvm.functions.*;
@@
-95,9
+94,9
@@
public class SonePlugin implements FredPlugin, FredPluginFCP, FredPluginL10n, Fr
}
/** The current year at time of release. */
}
/** The current year at time of release. */
- private static final int YEAR = 20
19
;
+ private static final int YEAR = 20
20
;
private static final String SONE_HOMEPAGE = "USK@nwa8lHa271k2QvJ8aa0Ov7IHAV-DFOCFgmDt3X6BpCI,DuQSUZiI~agF8c-6tjsFFGuZ8eICrzWCILB60nT8KKo,AQACAAE/sone/";
private static final String SONE_HOMEPAGE = "USK@nwa8lHa271k2QvJ8aa0Ov7IHAV-DFOCFgmDt3X6BpCI,DuQSUZiI~agF8c-6tjsFFGuZ8eICrzWCILB60nT8KKo,AQACAAE/sone/";
- private static final int LATEST_EDITION =
79
;
+ private static final int LATEST_EDITION =
81
;
/** The logger. */
private static final Logger logger = getLogger(SonePlugin.class.getName());
/** The logger. */
private static final Logger logger = getLogger(SonePlugin.class.getName());
@@
-110,6
+109,9
@@
public class SonePlugin implements FredPlugin, FredPluginFCP, FredPluginL10n, Fr
/** The core. */
private Core core;
/** The core. */
private Core core;
+ /** The event bus. */
+ private EventBus eventBus;
+
/** The web interface. */
private WebInterface webInterface;
/** The web interface. */
private WebInterface webInterface;
@@
-205,6
+207,9
@@
public class SonePlugin implements FredPlugin, FredPluginFCP, FredPluginL10n, Fr
/* we need to request this to install all notification handlers. */
injector.getInstance(NotificationHandler.class);
/* we need to request this to install all notification handlers. */
injector.getInstance(NotificationHandler.class);
+ /* and this is required to shutdown all tickers. */
+ injector.getInstance(TickerShutdown.class);
+
/* start core! */
core.start();
/* start core! */
core.start();
@@
-212,7
+217,7
@@
public class SonePlugin implements FredPlugin, FredPluginFCP, FredPluginL10n, Fr
webInterface.start();
/* send some events on startup */
webInterface.start();
/* send some events on startup */
-
EventBus
eventBus = injector.getInstance(EventBus.class);
+ eventBus = injector.getInstance(EventBus.class);
/* first start? */
if (injector.getInstance(Key.get(Boolean.class, Names.named("FirstStart")))) {
/* first start? */
if (injector.getInstance(Key.get(Boolean.class, Names.named("FirstStart")))) {
@@
-247,6
+252,9
@@
public class SonePlugin implements FredPlugin, FredPluginFCP, FredPluginL10n, Fr
*/
@Override
public void terminate() {
*/
@Override
public void terminate() {
+ /* send shutdown event. */
+ eventBus.post(new Shutdown());
+
try {
/* stop the web interface. */
webInterface.stop();
try {
/* stop the web interface. */
webInterface.stop();