public final class DefaultPlatformService extends AbstractSingletonService<Platform> implements PlatformService
Constructor and Description |
---|
DefaultPlatformService() |
Modifier and Type | Method and Description |
---|---|
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).
|
int |
exec(String... args)
Executes a native program and waits for it to return.
|
List<? extends Platform> |
filterInstances(List<Platform> list)
Allows subclasses to exclude instances.
|
AppEventService |
getAppEventService() |
CommandService |
getCommandService() |
EventService |
getEventService() |
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.
|
create, getInstance, getInstances
getPlugins, getPluginService
getContext, registerEventHandlers, setContext, toString
compareTo, getInfo, getPriority, setInfo, setPriority
context
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getInstance, getInstances
create, getPlugins, getPluginService
registerEventHandlers
context, getContext, setContext
getPriority, setPriority
compareTo
getInfo, setInfo
public EventService getEventService()
getEventService
in interface PlatformService
public CommandService getCommandService()
getCommandService
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)
AbstractSingletonService
filterInstances
in class AbstractSingletonService<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 Service
initialize
in class AbstractSingletonService<Platform>
public void dispose()
Disposable
dispose
in interface Disposable
dispose
in class AbstractService
protected void onEvent(AppMenusCreatedEvent event)
Copyright © 2009–2015 SciJava. All rights reserved.