Package anvil.script

Examples of anvil.script.Context


  }


  public void run()
  {
    Context context = _context;
    Any callable = _callable;
    Any[] parameters = _parameters;
    if (context != null && callable != null && parameters != null) {
      context.join(Thread.currentThread());
      try {
        context.log().info("Executing function: "+_callable);
        Any rv = _callable.execute(context, parameters);
        context.log().info("Function "+_callable+" exited, return value: "+rv);
       
      } catch (ExitException e) {
        context.log().info("Explicit thread termination, exit value: "+e.getExitValue());
       
      } catch (ScriptException e) {
        context.log().info("Uncaught exception\n" + e.getData());
       
      } catch (Throwable t) {
        context.log().info("Uncaught exception", t);
      }
    }
    clear();
  }
View Full Code Here


  }


  public void clear()
  {
    Context ctx = _context;
    if (ctx != null) {
      ctx.destroy();
    }
    _context = null;
    _callable = null;
    _parameters = null;
 
View Full Code Here

  }


  public Context getContext()
  {
    Context context = _context;
    if (context == null) {
      _context = context = Context.getInstance();
    }
    return context;
  }
View Full Code Here

      if (socket == null) {
        return;
      }
    }
   
    _context = new Context(_zone);
    InetAddress address = socket.getInetAddress();
    GenericInputStream input = null;
    PrintStream output = null;
    String hostname = address.getHostName();
    _log.info("Connection from "+hostname);
View Full Code Here

TOP

Related Classes of anvil.script.Context

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.