org.jpos.bsh
Class BSHRequestListener

java.lang.Object
  extended by org.jpos.util.Log
      extended by org.jpos.bsh.BSHRequestListener
All Implemented Interfaces:
Configurable, ISORequestListener, LogSource

public class BSHRequestListener
extends Log
implements ISORequestListener, Configurable

BSHRequestListener - BeanShell based request listener

Version:
$Revision$ $Date$
Author:
Alejandro P. Revilla

Field Summary
protected  String[] bshSource
           
protected static String MTI_MACRO
           
protected  HashSet whitelist
           
 
Fields inherited from class org.jpos.util.Log
DEBUG, ERROR, FATAL, INFO, logger, realm, TRACE, WARN
 
Constructor Summary
BSHRequestListener()
           
 
Method Summary
 boolean process(ISOSource source, ISOMsg m)
           
 void setConfiguration(Configuration cfg)
           
 
Methods inherited from class org.jpos.util.Log
createDebug, createDebug, createError, createError, createFatal, createFatal, createInfo, createInfo, createLogEvent, createLogEvent, createTrace, createTrace, createWarn, createWarn, debug, debug, error, error, fatal, fatal, getLog, getLogger, getRealm, info, info, setLogger, setLogger, setRealm, trace, trace, warn, warn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MTI_MACRO

protected static final String MTI_MACRO
See Also:
Constant Field Values

whitelist

protected HashSet whitelist

bshSource

protected String[] bshSource
Constructor Detail

BSHRequestListener

public BSHRequestListener()
Method Detail

setConfiguration

public void setConfiguration(Configuration cfg)
                      throws ConfigurationException
Specified by:
setConfiguration in interface Configurable
Parameters:
cfg -
  • whitelist - supported message types (example: "1100,1220")
  • source - BSH script(s) to run (can be more than one)
Throws:
ConfigurationException

process

public boolean process(ISOSource source,
                       ISOMsg m)
Specified by:
process in interface ISORequestListener
Parameters:
source - source where you optionally can reply
m - the unmatched request
Returns:
true if request was handled by this listener


Copyright © 1998-2012 jPOS.org. All Rights Reserved.