org.scijava.service
Interface Service

All Superinterfaces:
Comparable<Prioritized>, Contextual, Disposable, HasPluginInfo, Prioritized, RichPlugin, SciJavaPlugin
All Known Subinterfaces:
AppEventService, AppService, CommandService, ConsoleService, ConvertService, DisplayService, DragAndDropService, EventHistory, EventService, HandlerService<DT,PT>, IconService, InputService, IOService, LogService, MenuService, ModuleService, ObjectService, OptionsService, PlatformService, PluginService, PrefService, PTService<PT>, RecentFileService, SciJavaService, ScriptHeaderService, ScriptService, SingletonService<PT>, StatusService, TextService, ThreadService, ToolService, TypedService<DT,PT>, UIService, WelcomeService, WidgetService, WrapperService<DT,PT>
All Known Implementing Classes:
AbstractConvertService, AbstractHandlerService, AbstractLogService, AbstractPrefService, AbstractPTService, AbstractService, AbstractSingletonService, AbstractTypedService, AbstractWrapperService, DefaultAppEventService, DefaultAppService, DefaultCommandService, DefaultConsoleService, DefaultConvertService, DefaultDisplayService, DefaultDragAndDropService, DefaultEventHistory, DefaultEventService, DefaultInputService, DefaultIOService, DefaultMenuService, DefaultModuleService, DefaultObjectService, DefaultOptionsService, DefaultPlatformService, DefaultPluginService, DefaultPrefService, DefaultRecentFileService, DefaultScriptHeaderService, DefaultScriptService, DefaultStatusService, DefaultTextService, DefaultThreadService, DefaultToolService, DefaultUIService, DefaultWelcomeService, DefaultWidgetService, StderrLogService

public interface Service
extends RichPlugin, Disposable

A SciJava service, for a particular area of functionality.

Services discoverable at runtime must implement this interface and be annotated with @Plugin with attribute Plugin.type() = Service.class. While it possible to create a service merely by implementing this interface, it is encouraged to instead extend AbstractService, for convenience.

Author:
Curtis Rueden
See Also:
Plugin

Method Summary
 void initialize()
          Performs any needed initialization when the service is first loaded.
 void registerEventHandlers()
          Registers the service's event handler methods.
 
Methods inherited from interface org.scijava.Contextual
context, getContext, setContext
 
Methods inherited from interface org.scijava.Prioritized
getPriority, setPriority
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface org.scijava.plugin.HasPluginInfo
getInfo, setInfo
 
Methods inherited from interface org.scijava.Disposable
dispose
 

Method Detail

initialize

void initialize()
Performs any needed initialization when the service is first loaded.

NB: This method is not intended to be called directly. It is called by the service framework itself (specifically by the ServiceHelper) when initializing the service. It should not be called a second time.


registerEventHandlers

void registerEventHandlers()
Registers the service's event handler methods.

NB: This method is not intended to be called directly. It is called by the service framework itself (specifically by the ServiceHelper) when initializing the service. It should not be called a second time.



Copyright © 2009–2014 SciJava. All rights reserved.