org.scijava.platform
Interface PlatformService

All Superinterfaces:
Comparable<Prioritized>, Contextual, Disposable, HasPluginInfo, Prioritized, PTService<Platform>, RichPlugin, SciJavaPlugin, SciJavaService, Service, SingletonService<Platform>
All Known Implementing Classes:
DefaultPlatformService

public interface PlatformService
extends SingletonService<Platform>, SciJavaService

Interface for service that handles platform-specific deployment issues. A "platform" can be an operating system, CPU architecture, or version of Java.

Author:
Curtis Rueden

Method Summary
 int exec(String... args)
          Executes a native program and waits for it to return.
 AppEventService getAppEventService()
           
 CommandService getCommandService()
           
 EventService getEventService()
           
 List<Platform> getTargetPlatforms()
          Gets the platform handlers applicable to this platform.
 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.
 
Methods inherited from interface org.scijava.plugin.SingletonService
getInstance, getInstances
 
Methods inherited from interface org.scijava.plugin.PTService
getPlugins, getPluginService, getPluginType
 
Methods inherited from interface org.scijava.service.Service
initialize, registerEventHandlers
 
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

getEventService

EventService getEventService()

getCommandService

CommandService getCommandService()

getAppEventService

AppEventService getAppEventService()

getTargetPlatforms

List<Platform> getTargetPlatforms()
Gets the platform handlers applicable to this platform.


open

void open(URL url)
          throws IOException
Opens a URL in a platform-dependent way. Typically the URL is opened in an external web browser instance, but the behavior is ultimately defined by the available platform handler implementations.

Throws:
IOException

exec

int exec(String... args)
         throws IOException
Executes a native program and waits for it to return.

Returns:
the exit code of the execution.
Throws:
IOException

registerAppMenus

boolean registerAppMenus(Object menus)
Informs the active platform handlers of a UI's newly created application menu structure. Each active platform handler may choose to do something platform-specific with the menus.

Parameters:
menus - The UI's newly created menu structure
Returns:
true iff the menus should not be added to the UI as normal because a platform handler did something platform-specific with them instead.


Copyright © 2009–2014 SciJava. All rights reserved.