Logo Search packages:      
Sourcecode: nailgun version File versions  Download package

void com::martiansoftware::nailgun::NGContext::assertLocalClient (  )  [inline]

Throws a java.lang.SecurityException if the client is not connected from the local machine.

Definition at line 249 of file NGContext.java.

References getInetAddress().

            NetworkInterface iface = null;
            try {
                  iface = NetworkInterface.getByInetAddress(getInetAddress());
            } catch (java.net.SocketException se) {
                  throw (new SecurityException("Unable to determine if client is local.  Assuming he isn't."));
            if ((iface == null) && (!getInetAddress().isLoopbackAddress())) {
                  throw (new SecurityException("Client is not local."));

Generated by  Doxygen 1.6.0   Back to index