net.java.games.input
Class LinuxEnvironmentPlugin

java.lang.Object
  extended by net.java.games.input.ControllerEnvironment
      extended by net.java.games.input.LinuxEnvironmentPlugin
All Implemented Interfaces:
Plugin

public final class LinuxEnvironmentPlugin
extends ControllerEnvironment
implements Plugin

Environment plugin for linux


Field Summary
 
Fields inherited from class net.java.games.input.ControllerEnvironment
controllerListeners
 
Constructor Summary
LinuxEnvironmentPlugin()
           
 
Method Summary
static java.lang.Object execute(LinuxDeviceTask task)
           
 Controller[] getControllers()
          Returns a list of all controllers available to this environment, or an empty array if there are no controllers in this environment.
(package private) static java.lang.String getPrivilegedProperty(java.lang.String property)
           
(package private) static java.lang.String getPrivilegedProperty(java.lang.String property, java.lang.String default_value)
           
 boolean isSupported()
          Returns the isSupported status of this environment.
(package private) static void loadLibrary(java.lang.String lib_name)
          Static utility method for loading native libraries.
 
Methods inherited from class net.java.games.input.ControllerEnvironment
addControllerListener, fireControllerAdded, fireControllerRemoved, getDefaultEnvironment, log, logln, removeControllerListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinuxEnvironmentPlugin

public LinuxEnvironmentPlugin()
Method Detail

loadLibrary

static void loadLibrary(java.lang.String lib_name)
Static utility method for loading native libraries. It will try to load from either the path given by the net.java.games.input.librarypath property or through System.loadLibrary().


getPrivilegedProperty

static java.lang.String getPrivilegedProperty(java.lang.String property)

getPrivilegedProperty

static java.lang.String getPrivilegedProperty(java.lang.String property,
                                              java.lang.String default_value)

execute

public static final java.lang.Object execute(LinuxDeviceTask task)
                                      throws java.io.IOException
Throws:
java.io.IOException

getControllers

public final Controller[] getControllers()
Returns a list of all controllers available to this environment, or an empty array if there are no controllers in this environment.

Specified by:
getControllers in class ControllerEnvironment
Returns:
Returns a list of all controllers available to this environment, or an empty array if there are no controllers in this environment.

isSupported

public boolean isSupported()
Description copied from class: ControllerEnvironment
Returns the isSupported status of this environment. What makes an environment supported or not is up to the particular plugin, but may include OS or available hardware.

Specified by:
isSupported in class ControllerEnvironment