Provides quite a bit of potentially useful information to classes
specifically written for NailGun. The NailGun server itself, its
AliasManager, the remote client's environment variables, and other
information is available via this class. For all intents and purposes,
the NGContext represents a single connection from a NailGun client.
If a class is written with a
public static void nailMain(NGContext context)
method, that method will be called by NailGun instead of the traditional
main(String[]) method normally used for programs. A fully populated NGContext
object will then be provided to nailMain().
author: Marty Lamb
getWorkingDirectory() Returns the current working directory of the client, as reported by the client.
This is a String that will use the client's File.separator ('/' or '\'),
which may differ from the separator on the server.
Sends an exit command with the specified exit code to
the client. The client will exit immediately with
the specified exit code; you probably want to return
from nailMain immediately after calling this.
Parameters: exitCode - the exit code with which the clientshould exit
Returns the command line arguments for the command
implementation (nail) on the server.
the command line arguments for the commandimplementation (nail) on the server.
Returns the command that was issued by the client (either an alias or the name of a class).
This allows multiple aliases to point to the same class but result in different behaviors.
the command issued by the client
Returns a java.util.Properties object containing a copy
of the client's environment variables
See Also:java.util.Properties a java.util.Properties object containing a copyof the client's environment variables
Returns the current working directory of the client, as reported by the client.
This is a String that will use the client's File.separator ('/' or '\'),
which may differ from the separator on the server.
the current working directory of the client