org.apache.servicemix.scripting
Class DefaultScriptingMarshaler

java.lang.Object
  extended by org.apache.servicemix.scripting.DefaultScriptingMarshaler
All Implemented Interfaces:
ScriptingMarshalerSupport

public class DefaultScriptingMarshaler
extends java.lang.Object
implements ScriptingMarshalerSupport

Author:
lhein

Constructor Summary
DefaultScriptingMarshaler()
           
 
Method Summary
 java.io.InputStream getScriptCode(ScriptingEndpoint endpoint, javax.jbi.messaging.MessageExchange exchange)
          returns the code of the script as input stream
 void onShutdown(ScriptingEndpoint endpoint)
          hook method to allow a custom marshaler to do things on endpoint shutdown
 void onStartup(ScriptingEndpoint endpoint)
          hook method to allow a custom marshaler to do things on endpoint startup
 void registerUserBeans(ScriptingEndpoint endpoint, javax.jbi.messaging.MessageExchange exchange, javax.script.Bindings bindings)
          hook method for filling user beans into the available variables from script
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultScriptingMarshaler

public DefaultScriptingMarshaler()
Method Detail

onStartup

public void onStartup(ScriptingEndpoint endpoint)
               throws java.lang.Exception
Description copied from interface: ScriptingMarshalerSupport
hook method to allow a custom marshaler to do things on endpoint startup

Specified by:
onStartup in interface ScriptingMarshalerSupport
Parameters:
endpoint - the endpoint
Throws:
java.lang.Exception - on any exception

onShutdown

public void onShutdown(ScriptingEndpoint endpoint)
                throws java.lang.Exception
Description copied from interface: ScriptingMarshalerSupport
hook method to allow a custom marshaler to do things on endpoint shutdown

Specified by:
onShutdown in interface ScriptingMarshalerSupport
Parameters:
endpoint - the endpoint
Throws:
java.lang.Exception - on any exception

registerUserBeans

public void registerUserBeans(ScriptingEndpoint endpoint,
                              javax.jbi.messaging.MessageExchange exchange,
                              javax.script.Bindings bindings)
Description copied from interface: ScriptingMarshalerSupport
hook method for filling user beans into the available variables from script

Specified by:
registerUserBeans in interface ScriptingMarshalerSupport
Parameters:
endpoint - the endpoint
exchange - the exchange
bindings - the bindings

getScriptCode

public java.io.InputStream getScriptCode(ScriptingEndpoint endpoint,
                                         javax.jbi.messaging.MessageExchange exchange)
                                  throws java.io.IOException
Description copied from interface: ScriptingMarshalerSupport
returns the code of the script as input stream

Specified by:
getScriptCode in interface ScriptingMarshalerSupport
Parameters:
endpoint - the endpoint
exchange - the message exchange
Returns:
the code of the script as string
Throws:
java.io.IOException


Copyright © 2005-2013 FuseSource. All Rights Reserved.