public final class DefaultPlatformService extends AbstractSingletonService<Platform> implements PlatformService
| Constructor and Description |
|---|
DefaultPlatformService() |
| Modifier and Type | Method and Description |
|---|---|
CommandService |
commandService() |
void |
dispose()
Performs any needed cleanup of the object's services, in preparation for
the object being retired (e.g., to make garbage collection possible).
|
EventService |
eventService() |
int |
exec(String... args)
Executes a native program and waits for it to return.
|
List<? extends Platform> |
filterInstances(List<Platform> list)
Filters the given list of instances by this service's inclusion criteria.
|
AppEventService |
getAppEventService() |
Class<Platform> |
getPluginType()
Gets the type of plugins managed by this service.
|
List<Platform> |
getTargetPlatforms()
Gets the platform handlers applicable to this platform.
|
void |
initialize()
Performs any needed initialization when the service is first loaded.
|
protected void |
onEvent(AppMenusCreatedEvent event) |
void |
open(URL url)
Opens a URL in a platform-dependent way.
|
boolean |
registerAppMenus(Object menus)
Informs the active platform handlers of a UI's newly created application
menu structure.
|
getInstance, getInstances, objectService, onEvent, onEventpluginServicegetContext, setContext, toStringgetInfo, getPriority, setInfo, setPrioritycontextclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetCommandService, getEventServicecreate, getInstance, getInstances, objectServicegetPlugins, getPluginService, pluginServiceregisterEventHandlersgetIdentifier, logcontext, getContext, setContextcompareTo, getPriority, setPrioritygetInfo, setInfogetLocationgetVersionpublic EventService eventService()
eventService in interface PlatformServicepublic CommandService commandService()
commandService in interface PlatformServicepublic AppEventService getAppEventService()
getAppEventService in interface PlatformServicepublic List<Platform> getTargetPlatforms()
PlatformServicegetTargetPlatforms in interface PlatformServicepublic void open(URL url) throws IOException
PlatformServiceopen in interface PlatformServiceIOExceptionpublic int exec(String... args) throws IOException
PlatformServiceexec in interface PlatformServiceIOExceptionpublic boolean registerAppMenus(Object menus)
PlatformServiceregisterAppMenus in interface PlatformServicemenus - The UI's newly created menu structurepublic List<? extends Platform> filterInstances(List<Platform> list)
SingletonServicefilterInstances in interface SingletonService<Platform>list - the initial list of instancespublic Class<Platform> getPluginType()
PTServicegetPluginType in interface PTService<Platform>public void initialize()
Service
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.
initialize in interface Initializableinitialize in interface SingletonService<Platform>initialize in interface Servicepublic void dispose()
Disposabledispose in interface Disposableprotected void onEvent(AppMenusCreatedEvent event)
Copyright © 2015–2022 SciJava. All rights reserved.