Top Fields Constructors Methods
org.jruby.ext

public Class JRubyPOSIXHandler

extends Object
implements POSIXHandler
Class Inheritance
All Implemented Interfaces
jnr.posix.POSIXHandler
Imports
java.io.File, .InputStream, .PrintStream, java.util.Iterator, .Map, .Map.Entry, jnr.constants.platform.Errno, org.jruby.Ruby, .RubyHash, org.jruby.common.IRubyWarnings.ID, jnr.posix.POSIXHandler, org.jruby.util.cli.Options

Field Summary

Modifier and TypeField and Description
private final boolean
private final Ruby

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
error(Errno error, String extraData)

Implements jnr.posix.POSIXHandler.error.

public void
error(Errno error, String methodName, String extraData)

Implements jnr.posix.POSIXHandler.error.

public File
public String[]
public PrintStream
getErrorStream()

Implements jnr.posix.POSIXHandler.getErrorStream.

Get your runtime's current ErrorStream

public InputStream
public PrintStream
public int
getPID()

Implements jnr.posix.POSIXHandler.getPID.

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).

public boolean
public void
unimplementedError(String
the POSIX method that failed
method
)

Implements jnr.posix.POSIXHandler.unimplementedError.

Specify that posix method is unimplemented.

public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

isVerboseback to summary
private final boolean isVerbose
runtimeback to summary
private final Ruby runtime

Constructor Detail

JRubyPOSIXHandlerback to summary
public JRubyPOSIXHandler(Ruby runtime)

Method Detail

errorback to summary
public void error(Errno error, String extraData)

Implements jnr.posix.POSIXHandler.error.

errorback to summary
public void error(Errno error, String methodName, String extraData)

Implements jnr.posix.POSIXHandler.error.

getCurrentWorkingDirectoryback to summary
public File getCurrentWorkingDirectory()

Implements jnr.posix.POSIXHandler.getCurrentWorkingDirectory.

Returns:File

Doc from jnr.posix.POSIXHandler.getCurrentWorkingDirectory.

current working directory of your runtime.

getEnvback to summary
public String[] getEnv()

Implements jnr.posix.POSIXHandler.getEnv.

Returns:String[]

Doc from jnr.posix.POSIXHandler.getEnv.

current set of environment variables of your runtime.

Annotations
@SuppressWarnings:unchecked
getErrorStreamback to summary
public PrintStream getErrorStream()

Implements jnr.posix.POSIXHandler.getErrorStream.

Doc from jnr.posix.POSIXHandler.getErrorStream.

Get your runtime's current ErrorStream

Returns:PrintStream

your runtime's current error stream

getInputStreamback to summary
public InputStream getInputStream()

Implements jnr.posix.POSIXHandler.getInputStream.

Returns:InputStream

Doc from jnr.posix.POSIXHandler.getInputStream.

your runtime's current input stream

getOutputStreamback to summary
public PrintStream getOutputStream()

Implements jnr.posix.POSIXHandler.getOutputStream.

Returns:PrintStream

Doc from jnr.posix.POSIXHandler.getOutputStream.

your runtime's current output stream

getPIDback to summary
public int getPID()

Implements jnr.posix.POSIXHandler.getPID.

Doc from jnr.posix.POSIXHandler.getPID.

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 unimplementedError(String).

Returns:int

your runtime's process ID

isVerboseback to summary
public boolean isVerbose()

Implements jnr.posix.POSIXHandler.isVerbose.

Returns:boolean

Doc from jnr.posix.POSIXHandler.isVerbose.

should we provide verbose output about POSIX activities

unimplementedErrorback to summary
public void unimplementedError(String method)

Implements jnr.posix.POSIXHandler.unimplementedError.

Doc from jnr.posix.POSIXHandler.unimplementedError.

Specify that posix method is unimplemented. In JRuby we generate an exception with this.

Parameters
method:String

the POSIX method that failed

warnback to summary
public void warn(POSIXHandler.WARNING_ID id, String message, Object... data)

Implements jnr.posix.POSIXHandler.warn.