1 55 56 package org.apache.bsf.util; 57 58 import org.apache.bsf.*; 59 import org.apache.bsf.util.EngineUtils; 60 61 69 public class BSFFunctions { 70 BSFManager mgr; 71 BSFEngine engine; 72 73 public BSFFunctions (BSFManager mgr, BSFEngine engine) { 74 this.mgr = mgr; 75 this.engine = engine; 76 } 77 public void addEventListener (Object src, String eventSetName, 78 String filter, Object script) 79 throws BSFException { 80 EngineUtils.addEventListener (src, eventSetName, filter, engine, 81 mgr, "<event-binding>", 0, 0, script); 82 } 83 public Object lookupBean (String name) { 84 return mgr.lookupBean (name); 85 } 86 public void registerBean (String name, Object bean) { 87 mgr.registerBean (name, bean); 88 } 89 public void unregisterBean (String name) { 90 mgr.unregisterBean (name); 91 } 92 } 93 | Popular Tags |