Class DefaultPOSIXHandler

  • All Implemented Interfaces:
    POSIXHandler

    public class DefaultPOSIXHandler
    extends Object
    implements POSIXHandler
    A POSIXHandler with reasonable default behavior.
    • Constructor Detail

      • DefaultPOSIXHandler

        public DefaultPOSIXHandler()
    • Method Detail

      • error

        public void error​(jnr.constants.platform.Errno error,
                          String extraData)
        Specified by:
        error in interface POSIXHandler
      • error

        public void error​(jnr.constants.platform.Errno error,
                          String methodName,
                          String extraData)
        Specified by:
        error in interface POSIXHandler
      • unimplementedError

        public void unimplementedError​(String methodName)
        Description copied from interface: POSIXHandler
        Specify that posix method is unimplemented. In JRuby we generate an exception with this.
        Specified by:
        unimplementedError in interface POSIXHandler
        Parameters:
        methodName - the POSIX method that failed
      • isVerbose

        public boolean isVerbose()
        Specified by:
        isVerbose in interface POSIXHandler
        Returns:
        should we provide verbose output about POSIX activities
      • getEnv

        public String[] getEnv()
        Specified by:
        getEnv in interface POSIXHandler
        Returns:
        current set of environment variables of your runtime.
      • getPID

        public int getPID()
        Description copied from interface: POSIXHandler
        Get your runtime's process ID. This is only intended for non-native POSIX support (e.g. environments where JNA cannot load or security restricted environments). In JRuby we found a number of packages which would rather have some identity for the runtime than nothing. Note: If you do not want this to work you impl can just call POSIXHandler.unimplementedError(String).
        Specified by:
        getPID in interface POSIXHandler
        Returns:
        your runtime's process ID