com.lts.ipc.semaphore
Class SemaphoreResult

java.lang.Object
  extended by com.lts.ipc.semaphore.SemaphoreResult

public class SemaphoreResult
extends java.lang.Object

An internal class that contains the results from a native system call.

Calls to the underlying operation system will often have sever pieces of information instead of just success and failure. This class allows clients to get back all the information at once.

The RESULT_ constants are defined to make life easier for the JNI: accessing enum tags in JNI is somewhat difficult.

Author:
cnh

Nested Class Summary
static class SemaphoreResult.Results
           
 
Field Summary
 int errorCode
           
 long handle
           
static java.lang.String MSG_DOES_NOT_EXIST
           
static java.lang.String MSG_INSUFFICIENT_PERMISSIONS
           
static java.lang.String MSG_SUCCESS
           
static java.lang.String MSG_TIMEOUT
           
static java.lang.String MSG_UNKNOWN_ERROR
           
static java.lang.String MSG_UNKNOWN_HANDLE
           
 SemaphoreResult.Results result
           
static int RESULT_DOES_NOT_EXIST
           
static int RESULT_INSUFFICIENT_PERMISSIONS
           
static int RESULT_SUCCESS
           
static int RESULT_TIMEOUT
           
static int RESULT_UNKNOWN_ERROR
           
static int RESULT_UNKNOWN_HANDLE
           
 int resultCode
           
 
Constructor Summary
SemaphoreResult()
           
 
Method Summary
 void convertResultCode()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESULT_SUCCESS

public static final int RESULT_SUCCESS
See Also:
Constant Field Values

RESULT_INSUFFICIENT_PERMISSIONS

public static final int RESULT_INSUFFICIENT_PERMISSIONS
See Also:
Constant Field Values

RESULT_DOES_NOT_EXIST

public static final int RESULT_DOES_NOT_EXIST
See Also:
Constant Field Values

RESULT_UNKNOWN_ERROR

public static final int RESULT_UNKNOWN_ERROR
See Also:
Constant Field Values

RESULT_TIMEOUT

public static final int RESULT_TIMEOUT
See Also:
Constant Field Values

RESULT_UNKNOWN_HANDLE

public static final int RESULT_UNKNOWN_HANDLE
See Also:
Constant Field Values

MSG_INSUFFICIENT_PERMISSIONS

public static final java.lang.String MSG_INSUFFICIENT_PERMISSIONS
See Also:
Constant Field Values

MSG_SUCCESS

public static final java.lang.String MSG_SUCCESS
See Also:
Constant Field Values

MSG_DOES_NOT_EXIST

public static final java.lang.String MSG_DOES_NOT_EXIST
See Also:
Constant Field Values

MSG_UNKNOWN_ERROR

public static final java.lang.String MSG_UNKNOWN_ERROR
See Also:
Constant Field Values

MSG_TIMEOUT

public static final java.lang.String MSG_TIMEOUT
See Also:
Constant Field Values

MSG_UNKNOWN_HANDLE

public static final java.lang.String MSG_UNKNOWN_HANDLE
See Also:
Constant Field Values

resultCode

public int resultCode

result

public SemaphoreResult.Results result

errorCode

public int errorCode

handle

public long handle
Constructor Detail

SemaphoreResult

public SemaphoreResult()
Method Detail

convertResultCode

public void convertResultCode()