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, onEvent
pluginService
getContext, setContext, toString
getInfo, getPriority, setInfo, setPriority
context
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getCommandService, getEventService
create, getInstance, getInstances, objectService
getPlugins, getPluginService, pluginService
registerEventHandlers
getIdentifier, log
context, getContext, setContext
compareTo, getPriority, setPriority
getInfo, setInfo
getLocation
getVersion
public EventService eventService()
eventService
in interface PlatformService
public CommandService commandService()
commandService
in interface PlatformService
public AppEventService getAppEventService()
getAppEventService
in interface PlatformService
public List<Platform> getTargetPlatforms()
PlatformService
getTargetPlatforms
in interface PlatformService
public void open(URL url) throws IOException
PlatformService
open
in interface PlatformService
IOException
public int exec(String... args) throws IOException
PlatformService
exec
in interface PlatformService
IOException
public boolean registerAppMenus(Object menus)
PlatformService
registerAppMenus
in interface PlatformService
menus
- The UI's newly created menu structurepublic List<? extends Platform> filterInstances(List<Platform> list)
SingletonService
filterInstances
in interface SingletonService<Platform>
list
- the initial list of instancespublic Class<Platform> getPluginType()
PTService
getPluginType
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 Initializable
initialize
in interface SingletonService<Platform>
initialize
in interface Service
public void dispose()
Disposable
dispose
in interface Disposable
protected void onEvent(AppMenusCreatedEvent event)
Copyright © 2015–2022 SciJava. All rights reserved.