Skip to content

Commit a855314

Browse files
committed
Service: implement the Initializable interface
1 parent cdf8788 commit a855314

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/java/org/scijava/service/Service.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
package org.scijava.service;
3333

3434
import org.scijava.Disposable;
35+
import org.scijava.Initializable;
3536
import org.scijava.event.EventService;
3637
import org.scijava.plugin.Plugin;
3738
import org.scijava.plugin.RichPlugin;
@@ -49,7 +50,7 @@
4950
* @author Curtis Rueden
5051
* @see Plugin
5152
*/
52-
public interface Service extends RichPlugin, Disposable {
53+
public interface Service extends RichPlugin, Initializable, Disposable {
5354

5455
/**
5556
* Registers the service's event handler methods.
@@ -67,6 +68,8 @@ default void registerEventHandlers() {
6768
if (eventService != null) eventService.subscribe(this);
6869
}
6970

71+
// -- Initializable methods --
72+
7073
/**
7174
* Performs any needed initialization when the service is first loaded.
7275
* <p>
@@ -75,6 +78,7 @@ default void registerEventHandlers() {
7578
* when initializing the service. It should not be called a second time.
7679
* </p>
7780
*/
81+
@Override
7882
default void initialize() {
7983
// NB: Do nothing by default.
8084
}

0 commit comments

Comments
 (0)