Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.runtime.scripting
Class ScriptingClient

java.lang.Object
  extended by org.nuxeo.runtime.scripting.ScriptingClient

public class ScriptingClient
extends Object

Author:
Bogdan Stefanescu

Constructor Summary
ScriptingClient(String host, int port)
           
 
Method Summary
 ScriptContext getScriptContext()
           
 ScriptingServer getServer()
           
 RemoteScript loadScript(File file)
           
 RemoteScript loadScript(String name, Reader reader)
           
 RemoteScript loadScript(String name, String content)
           
 RemoteScript loadScript(URL url)
           
static void main(String[] args)
          Runs a remote script.
 void setScriptContext(ScriptContext ctx)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScriptingClient

public ScriptingClient(String host,
                       int port)
                throws Exception
Throws:
Exception
Method Detail

getServer

public ScriptingServer getServer()

loadScript

public RemoteScript loadScript(File file)
                        throws IOException
Throws:
IOException

loadScript

public RemoteScript loadScript(URL url)
                        throws IOException
Throws:
IOException

loadScript

public RemoteScript loadScript(String name,
                               String content)

loadScript

public RemoteScript loadScript(String name,
                               Reader reader)
                        throws IOException
Throws:
IOException

setScriptContext

public void setScriptContext(ScriptContext ctx)

getScriptContext

public ScriptContext getScriptContext()

main

public static void main(String[] args)
Runs a remote script. Example of usage:

java -cp ... org.nuxeo.runtime.scripting.ScriptingClient localhost:62474 test.js

Parameters:
args - a 2 length array containing on index 0 the nuxeo runtime host info and on index 1 the script file path to execute on that host

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.