Package org.scijava.service
Class AbstractService
- java.lang.Object
-
- org.scijava.AbstractContextual
-
- org.scijava.plugin.AbstractRichPlugin
-
- org.scijava.service.AbstractService
-
- All Implemented Interfaces:
Comparable<Prioritized>,Contextual,Disposable,Identifiable,Initializable,Locatable,Logged,HasPluginInfo,RichPlugin,SciJavaPlugin,Prioritized,Service,Versioned
- Direct Known Subclasses:
AbstractLogService,AbstractPrefService,AbstractPTService,DefaultAppEventService,DefaultCacheService,DefaultDisplayService,DefaultDownloadService,DefaultEventHistory,DefaultEventService,DefaultInputService,DefaultMainService,DefaultMenuService,DefaultModuleService,DefaultNIOService,DefaultObjectService,DefaultParseService,DefaultPluginService,DefaultRecentFileService,DefaultStartupService,DefaultStatusService,DefaultTaskService,DefaultThreadService,DefaultUIService,DefaultWelcomeService
public abstract class AbstractService extends AbstractRichPlugin implements Service
Abstract superclass ofServiceimplementations.- Author:
- Curtis Rueden
-
-
Constructor Summary
Constructors Constructor Description AbstractService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ContextgetContext()Gets the application context to which the object belongs, or null ifContextual.setContext(Context)has not yet been called on this object.voidsetContext(Context context)Sets the application context to which the object belongs.StringtoString()-
Methods inherited from class org.scijava.plugin.AbstractRichPlugin
getInfo, getPriority, setInfo, setPriority
-
Methods inherited from class org.scijava.AbstractContextual
context
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.scijava.Contextual
context
-
Methods inherited from interface org.scijava.Disposable
dispose
-
Methods inherited from interface org.scijava.plugin.HasPluginInfo
getInfo, setInfo
-
Methods inherited from interface org.scijava.Locatable
getLocation
-
Methods inherited from interface org.scijava.Prioritized
compareTo, getPriority, setPriority
-
Methods inherited from interface org.scijava.plugin.RichPlugin
getIdentifier, log
-
Methods inherited from interface org.scijava.service.Service
initialize, registerEventHandlers
-
Methods inherited from interface org.scijava.Versioned
getVersion
-
-
-
-
Method Detail
-
getContext
public Context getContext()
Description copied from interface:ContextualGets the application context to which the object belongs, or null ifContextual.setContext(Context)has not yet been called on this object.- Specified by:
getContextin interfaceContextual- Overrides:
getContextin classAbstractContextual- See Also:
Contextual.context()
-
setContext
public void setContext(Context context)
Description copied from interface:ContextualSets the application context to which the object belongs.Typically this method simply delegates to
Context.inject(Object), and should be called only once to populate the context. Most contextual objects do not support later alteration of the context, and will throwIllegalStateExceptionif this method is invoked again.- Specified by:
setContextin interfaceContextual- See Also:
Context.inject(Object)
-
toString
public String toString()
- Overrides:
toStringin classAbstractRichPlugin
-
-