- addAlias(Alias) - Method in class com.martiansoftware.nailgun.AliasManager
-
Adds an Alias, replacing any previous entries with the same name.
- addr - Variable in class com.martiansoftware.nailgun.NGServer
-
The address on which to listen, or null to listen on all local addresses
- addToSystemClassLoader(URL) - Static method in class com.martiansoftware.nailgun.builtins.NGClasspath
-
Adds the specified URL (for a jar or a directory) to the System
ClassLoader.
- Alias - Class in com.martiansoftware.nailgun
-
Provides a means to map memorable, short names to classes in order
to make the issuing of commands more convenient.
- Alias(String, String, Class) - Constructor for class com.martiansoftware.nailgun.Alias
-
Creates a new Alias with the specified properties.
- aliases - Variable in class com.martiansoftware.nailgun.AliasManager
-
actual alias storage
- AliasManager - Class in com.martiansoftware.nailgun
-
An AliasManager is used to store and lookup command Aliases by name.
- AliasManager() - Constructor for class com.martiansoftware.nailgun.AliasManager
-
Creates a new AliasManager, populating it with default Aliases.
- aliasManager - Variable in class com.martiansoftware.nailgun.NGServer
-
This NGServer's AliasManager, which maps aliases to classes
- allNailStats - Variable in class com.martiansoftware.nailgun.NGServer
-
a collection of all classes executed by this server so far
- allowNailsByClassName - Variable in class com.martiansoftware.nailgun.NGServer
-
If true, fully-qualified classnames are valid commands
- allowsNailsByClassName() - Method in class com.martiansoftware.nailgun.NGServer
-
Returns a flag that indicates whether Nail lookups by classname are
allowed.
- args - Variable in class com.martiansoftware.nailgun.NGContext
-
Command line arguments for the nail
- assertLocalClient() - Method in class com.martiansoftware.nailgun.NGContext
-
Throws a java.lang.SecurityException
if the client is not
connected from the local machine.
- assertLoopbackClient() - Method in class com.martiansoftware.nailgun.NGContext
-
Throws a java.lang.SecurityException
if the client is not
connected via the loopback address.
- available() - Method in class com.martiansoftware.nailgun.NGInputStream
-
- available() - Method in class com.martiansoftware.nailgun.ThreadLocalInputStream
-
- checkError() - Method in class com.martiansoftware.nailgun.ThreadLocalPrintStream
-
- checkExit(int) - Method in class com.martiansoftware.nailgun.NGSecurityManager
-
- checkPermission(Permission) - Method in class com.martiansoftware.nailgun.NGSecurityManager
-
- checkPermission(Permission, Object) - Method in class com.martiansoftware.nailgun.NGSecurityManager
-
- CHUNKTYPE_ARGUMENT - Static variable in class com.martiansoftware.nailgun.NGConstants
-
Chunk type marker for command line arguments
- CHUNKTYPE_COMMAND - Static variable in class com.martiansoftware.nailgun.NGConstants
-
Chunk type marker for the command (alias or class)
- CHUNKTYPE_ENVIRONMENT - Static variable in class com.martiansoftware.nailgun.NGConstants
-
Chunk type marker for client environment variables
- CHUNKTYPE_EXIT - Static variable in class com.martiansoftware.nailgun.NGConstants
-
Chunk type marker for client exit chunks
- CHUNKTYPE_STARTINPUT - Static variable in class com.martiansoftware.nailgun.NGConstants
-
Chunk type marker for a "startinput" chunk.
- CHUNKTYPE_STDERR - Static variable in class com.martiansoftware.nailgun.NGConstants
-
Chunk type marker for stderr
- CHUNKTYPE_STDIN - Static variable in class com.martiansoftware.nailgun.NGConstants
-
Chunk type marker for stdin
- CHUNKTYPE_STDIN_EOF - Static variable in class com.martiansoftware.nailgun.NGConstants
-
Chunk type marker for the end of stdin
- CHUNKTYPE_STDOUT - Static variable in class com.martiansoftware.nailgun.NGConstants
-
Chunk type marker for stdout
- CHUNKTYPE_WORKINGDIRECTORY - Static variable in class com.martiansoftware.nailgun.NGConstants
-
Chunk type marker for client working directory
- clazz - Variable in class com.martiansoftware.nailgun.Alias
-
The class providing a main()
or nailMain()
method
- clone() - Method in class com.martiansoftware.nailgun.NailStats
-
Creates a copy of this NailStats
object.
- close() - Method in class com.martiansoftware.nailgun.ThreadLocalInputStream
-
- close() - Method in class com.martiansoftware.nailgun.ThreadLocalPrintStream
-
- com.martiansoftware.nailgun - package com.martiansoftware.nailgun
-
- com.martiansoftware.nailgun.builtins - package com.martiansoftware.nailgun.builtins
-
- com.martiansoftware.nailgun.examples - package com.martiansoftware.nailgun.examples
-
- command - Variable in class com.martiansoftware.nailgun.NGContext
-
The command that was issued for this connection
- compareTo(Object) - Method in class com.martiansoftware.nailgun.Alias
-
Compares Alias names - no other fields are compared.
- getAlias(String) - Method in class com.martiansoftware.nailgun.AliasManager
-
Returns the Alias with the specified name
- getAliasedClass() - Method in class com.martiansoftware.nailgun.Alias
-
Returns the Class
object providing a static main()
or nailMain()
method
for this command.
- getAliases() - Method in class com.martiansoftware.nailgun.AliasManager
-
Returns a Set that is a snapshot of the Alias list.
- getAliasManager() - Method in class com.martiansoftware.nailgun.NGServer
-
Returns the AliasManager in use by this NGServer.
- getArgs() - Method in class com.martiansoftware.nailgun.NGContext
-
Returns the command line arguments for the command
implementation (nail) on the server.
- getCommand() - Method in class com.martiansoftware.nailgun.NGContext
-
Returns the command that was issued by the client (either an alias or the name of a class).
- getCryptoImpls(String) - Static method in class com.martiansoftware.nailgun.examples.Hash
-
Provides a list of algorithms for the specified service (which, for
our purposes, is "MessageDigest".
- getDefaultNailClass() - Method in class com.martiansoftware.nailgun.NGServer
-
Returns the default class that will be used if no Nails can be found via
alias or classname.
- getDescription() - Method in class com.martiansoftware.nailgun.Alias
-
Returns a description for the aliased command
- getEnv() - Method in class com.martiansoftware.nailgun.NGContext
-
Returns a java.util.Properties
object containing a copy
of the client's environment variables
- getFileSeparator() - Method in class com.martiansoftware.nailgun.NGContext
-
Returns the file separator ('/' or '\\') used by the client's os.
- getInetAddress() - Method in class com.martiansoftware.nailgun.NGContext
-
Returns the address of the client at the other side of this connection.
- getInputStream() - Method in class com.martiansoftware.nailgun.ThreadLocalInputStream
-
Returns this thread's InputStream
- getNailClass() - Method in class com.martiansoftware.nailgun.NailStats
-
Returns the class for which we're tracking statistics
- getNailStats() - Method in class com.martiansoftware.nailgun.NGServer
-
Returns a snapshot of this NGServer's nail statistics.
- getName() - Method in class com.martiansoftware.nailgun.Alias
-
Returns the name of the aliased command
- getNGServer() - Method in class com.martiansoftware.nailgun.NGContext
-
Returns the NGServer that accepted this connection
- getOrCreateStatsFor(Class) - Method in class com.martiansoftware.nailgun.NGServer
-
Returns the current NailStats object for the specified class, creating a
new one if necessary
- getPathSeparator() - Method in class com.martiansoftware.nailgun.NGContext
-
Returns the path separator (':' or ';') used by the client's os.
- getPort() - Method in class com.martiansoftware.nailgun.NGContext
-
Returns the port on the client connected to the NailGun
server.
- getPort() - Method in class com.martiansoftware.nailgun.NGServer
-
Returns the port on which this server is (or will be) listening.
- getPrintStream() - Method in class com.martiansoftware.nailgun.ThreadLocalPrintStream
-
Returns this thread's PrintStream
- getRefCount() - Method in class com.martiansoftware.nailgun.NailStats
-
Returns the number of sessions currently running this nail.
- getRunCount() - Method in class com.martiansoftware.nailgun.NailStats
-
Returns the number of times this nail has been run.
- getStatus() - Method in exception com.martiansoftware.nailgun.NGExitException
-
The status code returned by System.exit()
- getVersion() - Static method in class com.martiansoftware.nailgun.NGConstants
-
Returns the Nailgun version number
- getWorkingDirectory() - Method in class com.martiansoftware.nailgun.NGContext
-
Returns the current working directory of the client, as reported by the client.
- give(NGSession) - Method in class com.martiansoftware.nailgun.NGSessionPool
-
Returns an NGSession to the pool.
- nailclass - Variable in class com.martiansoftware.nailgun.NailStats
-
- nailFinished() - Method in class com.martiansoftware.nailgun.NailStats
-
Logs the fact that an instance of this nail has finished
- nailFinished(Class) - Method in class com.martiansoftware.nailgun.NGServer
-
Provides a means for an NGSession to register the completion of a nails
execution with the server.
- nailMain(NGContext) - Static method in class com.martiansoftware.nailgun.builtins.DefaultNail
-
- nailMain(NGContext) - Static method in class com.martiansoftware.nailgun.builtins.NGAlias
-
- nailMain(NGContext) - Static method in class com.martiansoftware.nailgun.builtins.NGClasspath
-
- nailMain(NGContext) - Static method in class com.martiansoftware.nailgun.builtins.NGServerStats
-
- nailMain(NGContext) - Static method in class com.martiansoftware.nailgun.builtins.NGStop
-
- nailMain(NGContext) - Static method in class com.martiansoftware.nailgun.builtins.NGVersion
-
- nailMain(NGContext) - Static method in class com.martiansoftware.nailgun.examples.DumpAll
-
- nailMain(NGContext) - Static method in class com.martiansoftware.nailgun.examples.Hash
-
Hashes client stdin, displays hash result to client stdout.
- nailMain(NGContext) - Static method in class com.martiansoftware.nailgun.examples.Prompt
-
- nailMain(NGContext) - Static method in class com.martiansoftware.nailgun.examples.Stack
-
- nailMainSignature - Static variable in class com.martiansoftware.nailgun.NGSession
-
signature of nailMain(NGContext) for reflection operations
- nailShutdown(NGServer) - Static method in class com.martiansoftware.nailgun.builtins.NGServerStats
-
- nailShutdown(NGServer) - Static method in class com.martiansoftware.nailgun.examples.Stack
-
- nailStarted() - Method in class com.martiansoftware.nailgun.NailStats
-
Logs the fact that an instance of this nail has started
- nailStarted(Class) - Method in class com.martiansoftware.nailgun.NGServer
-
Provides a means for an NGSession to register the starting of a nail
execution with the server.
- NailStats - Class in com.martiansoftware.nailgun
-
Collects and provides statistics on a nail.
- NailStats(Class) - Constructor for class com.martiansoftware.nailgun.NailStats
-
Creates a new NailStats object for the specified class
- name - Variable in class com.martiansoftware.nailgun.Alias
-
The alias name
- name - Variable in class com.martiansoftware.nailgun.examples.ThreadTest
-
- nextSocket - Variable in class com.martiansoftware.nailgun.NGSession
-
The next socket this NGSession has been tasked with processing (by
NGServer)
- nextSocket() - Method in class com.martiansoftware.nailgun.NGSession
-
Returns the next socket to process.
- NGAlias - Class in com.martiansoftware.nailgun.builtins
-
Provides a means to view and add aliases.
- NGAlias() - Constructor for class com.martiansoftware.nailgun.builtins.NGAlias
-
- NGClasspath - Class in com.martiansoftware.nailgun.builtins
-
Provides a means to display and add to the system classpath at runtime.
- NGClasspath() - Constructor for class com.martiansoftware.nailgun.builtins.NGClasspath
-
- NGConstants - Class in com.martiansoftware.nailgun
-
Just a simple holder for various NailGun-related contants.
- NGConstants() - Constructor for class com.martiansoftware.nailgun.NGConstants
-
- NGContext - Class in com.martiansoftware.nailgun
-
Provides quite a bit of potentially useful information to classes
specifically written for NailGun.
- NGContext() - Constructor for class com.martiansoftware.nailgun.NGContext
-
Creates a new, empty NGContext
- NGExitException - Exception in com.martiansoftware.nailgun
-
Security exception which wraps an exit status code.
- NGExitException(int) - Constructor for exception com.martiansoftware.nailgun.NGExitException
-
Constructs an exit exception.
- NGInputStream - Class in com.martiansoftware.nailgun
-
A FilterInputStream that is able to read the chunked stdin stream
from a NailGun client.
- NGInputStream(InputStream, DataOutputStream) - Constructor for class com.martiansoftware.nailgun.NGInputStream
-
Creates a new NGInputStream wrapping the specified InputStream
- NGOutputStream - Class in com.martiansoftware.nailgun
-
Wraps an OutputStream to send writes in NailGun chunks.
- NGOutputStream(OutputStream, byte) - Constructor for class com.martiansoftware.nailgun.NGOutputStream
-
Creates a new NGOutputStream wrapping the specified
OutputStream and using the specified Nailgun chunk code.
- NGSecurityManager - Class in com.martiansoftware.nailgun
-
Security manager which does nothing other than trap
checkExit, or delegate all non-deprecated methods to
a base manager.
- NGSecurityManager(SecurityManager) - Constructor for class com.martiansoftware.nailgun.NGSecurityManager
-
Construct an NGSecurityManager with the given base.
- NGServer - Class in com.martiansoftware.nailgun
-
Listens for new connections from NailGun clients and launches NGSession
threads to process them.
- NGServer(InetAddress, int, int) - Constructor for class com.martiansoftware.nailgun.NGServer
-
Creates a new NGServer that will listen at the specified address and on
the specified port with the specified session pool size.
- NGServer(InetAddress, int) - Constructor for class com.martiansoftware.nailgun.NGServer
-
Creates a new NGServer that will listen at the specified address and on
the specified port with the default session pool size.
- NGServer() - Constructor for class com.martiansoftware.nailgun.NGServer
-
Creates a new NGServer that will listen on the default port (defined in
NGConstants.DEFAULT_PORT
).
- NGServer.NGServerShutdowner - Class in com.martiansoftware.nailgun
-
A shutdown hook that will cleanly bring down the NGServer if it is
interrupted.
- NGServerShutdowner(NGServer) - Constructor for class com.martiansoftware.nailgun.NGServer.NGServerShutdowner
-
- NGServerStats - Class in com.martiansoftware.nailgun.builtins
-
Displays all
NailStats tracked by the server.
- NGServerStats() - Constructor for class com.martiansoftware.nailgun.builtins.NGServerStats
-
- NGSession - Class in com.martiansoftware.nailgun
-
Reads the NailGun stream from the client through the command, then hands off
processing to the appropriate class.
- NGSession(NGSessionPool, NGServer) - Constructor for class com.martiansoftware.nailgun.NGSession
-
Creates a new NGSession running for the specified NGSessionPool and
NGServer.
- NGSessionPool - Class in com.martiansoftware.nailgun
-
Provides NGSession pooling functionality.
- NGSessionPool(NGServer, int) - Constructor for class com.martiansoftware.nailgun.NGSessionPool
-
Creates a new NGSessionRunner operating for the specified server, with
the specified number of threads
- NGStop - Class in com.martiansoftware.nailgun.builtins
-
Shuts down the currently running server.
- NGStop() - Constructor for class com.martiansoftware.nailgun.builtins.NGStop
-
- NGVersion - Class in com.martiansoftware.nailgun.builtins
-
Displays the version of the NailGun server and exits.
- NGVersion() - Constructor for class com.martiansoftware.nailgun.builtins.NGVersion
-
- server - Variable in class com.martiansoftware.nailgun.NGContext
-
The NGServer that accepted this connection
- server - Variable in class com.martiansoftware.nailgun.NGServer.NGServerShutdowner
-
- server - Variable in class com.martiansoftware.nailgun.NGSession
-
The server this NGSession is working for
- server - Variable in class com.martiansoftware.nailgun.NGSessionPool
-
reference to server we're working for
- serversocket - Variable in class com.martiansoftware.nailgun.NGServer
-
The socket doing the listening
- sessionPool - Variable in class com.martiansoftware.nailgun.NGServer
-
A pool of NGSessions ready to handle client connections
- sessionPool - Variable in class com.martiansoftware.nailgun.NGSession
-
The pool this NGSession came from, and to which it will return itself
- setAllowNailsByClassName(boolean) - Method in class com.martiansoftware.nailgun.NGServer
-
Sets a flag that determines whether Nails can be executed by class name.
- setArgs(String[]) - Method in class com.martiansoftware.nailgun.NGContext
-
- setCommand(String) - Method in class com.martiansoftware.nailgun.NGContext
-
- setDefaultNailClass(Class) - Method in class com.martiansoftware.nailgun.NGServer
-
Sets the default class to use for the Nail if no Nails can be found via
alias or classname.
- setEnv(Properties) - Method in class com.martiansoftware.nailgun.NGContext
-
- setExit(PrintStream) - Static method in class com.martiansoftware.nailgun.NGSecurityManager
-
- setExitStream(PrintStream) - Method in class com.martiansoftware.nailgun.NGContext
-
- setInetAddress(InetAddress) - Method in class com.martiansoftware.nailgun.NGContext
-
- setNGServer(NGServer) - Method in class com.martiansoftware.nailgun.NGContext
-
- setPort(int) - Method in class com.martiansoftware.nailgun.NGContext
-
- setWorkingDirectory(String) - Method in class com.martiansoftware.nailgun.NGContext
-
- sharedLock - Static variable in class com.martiansoftware.nailgun.NGSession
-
A lock shared among all NGSessions
- sharedStack - Static variable in class com.martiansoftware.nailgun.examples.Stack
-
- shutdown - Variable in class com.martiansoftware.nailgun.NGServer
-
True if this NGServer has received instructions to shut down
- shutdown(boolean) - Method in class com.martiansoftware.nailgun.NGServer
-
Shuts down the server.
- shutdown() - Method in class com.martiansoftware.nailgun.NGSession
-
Shuts down this NGSession gracefully
- shutdown() - Method in class com.martiansoftware.nailgun.NGSessionPool
-
Shuts down the pool.
- skip(long) - Method in class com.martiansoftware.nailgun.ThreadLocalInputStream
-
- Stack - Class in com.martiansoftware.nailgun.examples
-
Provides some nice command-line stack operations.
- Stack() - Constructor for class com.martiansoftware.nailgun.examples.Stack
-
- started - Variable in class com.martiansoftware.nailgun.NGInputStream
-
- status - Variable in exception com.martiansoftware.nailgun.NGExitException
-
Status code
- streamCode - Variable in class com.martiansoftware.nailgun.NGOutputStream
-
- streams - Variable in class com.martiansoftware.nailgun.ThreadLocalInputStream
-
The InputStreams for the various threads
- streams - Variable in class com.martiansoftware.nailgun.ThreadLocalPrintStream
-
The PrintStreams for the various threads