Package com.martiansoftware.nailgun
Class NGConstants
java.lang.Object
com.martiansoftware.nailgun.NGConstants
Just a simple holder for various NailGun-related contants.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final byte
Chunk type marker for command line argumentsstatic final byte
Chunk type marker for the command (alias or class)static final byte
Chunk type marker for client environment variablesstatic final byte
Chunk type marker for client exit chunksstatic final byte
Chunk type marker for heartbeats sent to let the server know the client is still alive.static final byte
Chunk type marker for a "startinput" chunk.static final byte
Chunk type marker for stderrstatic final byte
Chunk type marker for stdinstatic final byte
Chunk type marker for the end of stdinstatic final byte
Chunk type marker for stdoutstatic final byte
Chunk type marker for client working directorystatic final int
The default NailGun port (2113)static final int
The exit code sent to clients if an exception occurred on the serverstatic final int
The exit code sent to clients if an invalid command is sentstatic final short
Expected interval between heartbeats in milliseconds.static final short
Maximum interval to wait between heartbeats before considering client to have disconnected.static final short
Maximum chunk len sent from client.static final String
Server version number -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
DEFAULT_PORT
public static final int DEFAULT_PORTThe default NailGun port (2113)- See Also:
-
EXIT_EXCEPTION
public static final int EXIT_EXCEPTIONThe exit code sent to clients if an exception occurred on the server- See Also:
-
EXIT_NOSUCHCOMMAND
public static final int EXIT_NOSUCHCOMMANDThe exit code sent to clients if an invalid command is sent- See Also:
-
CHUNKTYPE_ARGUMENT
public static final byte CHUNKTYPE_ARGUMENTChunk type marker for command line arguments- See Also:
-
CHUNKTYPE_ENVIRONMENT
public static final byte CHUNKTYPE_ENVIRONMENTChunk type marker for client environment variables- See Also:
-
CHUNKTYPE_COMMAND
public static final byte CHUNKTYPE_COMMANDChunk type marker for the command (alias or class)- See Also:
-
CHUNKTYPE_WORKINGDIRECTORY
public static final byte CHUNKTYPE_WORKINGDIRECTORYChunk type marker for client working directory- See Also:
-
CHUNKTYPE_STDIN
public static final byte CHUNKTYPE_STDINChunk type marker for stdin- See Also:
-
CHUNKTYPE_STDIN_EOF
public static final byte CHUNKTYPE_STDIN_EOFChunk type marker for the end of stdin- See Also:
-
CHUNKTYPE_STDOUT
public static final byte CHUNKTYPE_STDOUTChunk type marker for stdout- See Also:
-
CHUNKTYPE_STDERR
public static final byte CHUNKTYPE_STDERRChunk type marker for stderr- See Also:
-
CHUNKTYPE_EXIT
public static final byte CHUNKTYPE_EXITChunk type marker for client exit chunks- See Also:
-
CHUNKTYPE_SENDINPUT
public static final byte CHUNKTYPE_SENDINPUTChunk type marker for a "startinput" chunk. This chunk type is sent from the server to the client and indicates that the client should begin sending stdin to the server. It is automatically sent the first time the client's inputstream is read.- See Also:
-
CHUNKTYPE_HEARTBEAT
public static final byte CHUNKTYPE_HEARTBEATChunk type marker for heartbeats sent to let the server know the client is still alive.- See Also:
-
VERSION
Server version number -
HEARTBEAT_INTERVAL_MILLIS
public static final short HEARTBEAT_INTERVAL_MILLISExpected interval between heartbeats in milliseconds.- See Also:
-
HEARTBEAT_TIMEOUT_MILLIS
public static final short HEARTBEAT_TIMEOUT_MILLISMaximum interval to wait between heartbeats before considering client to have disconnected.- See Also:
-
MAXIMUM_CHUNK_LENGTH
public static final short MAXIMUM_CHUNK_LENGTHMaximum chunk len sent from client.- See Also:
-
-
Constructor Details
-
NGConstants
public NGConstants()
-
-
Method Details
-
getVersion
Returns the Nailgun version number- Returns:
- the Nailgun version number
-