Class BSH

  extended by org.jgroups.stack.Protocol
      extended by org.jgroups.protocols.BSH
All Implemented Interfaces:

public class BSH
extends Protocol
implements java.lang.Runnable

Beanshell ( interpreter class. The eval() method receives Java code, executes it and returns the result of the evaluation (or an exception).

This protocol is experimental User: Bela Date: Mar 8, 2003 Time: 1:57:07 PM

Bela Ban

Field Summary
protected  java.lang.Thread acceptor
protected  bsh.Interpreter interpreter
protected  java.util.List<> sockets
protected srv_sock
Fields inherited from class org.jgroups.stack.Protocol
down_prot, ergonomics, id, log, name, stack, stats, up_prot
Constructor Summary
Method Summary
 void run()
 void start()
          This method is called on a Channel.connect(String).
 void stop()
          This method is called on a Channel.disconnect().
Methods inherited from class org.jgroups.stack.Protocol
destroy, down, downThreadEnabled, dumpStats, enableStats, getConfigurableObjects, getDownProtocol, getId, getLevel, getName, getProperties, getProtocolStack, getSocketFactory, getThreadFactory, getTransport, getUpProtocol, getValue, init, isErgonomics, printStats, providedDownServices, providedUpServices, requiredDownServices, requiredUpServices, resetStats, setDownProtocol, setErgonomics, setId, setLevel, setProperties, setPropertiesInternal, setProperty, setProtocolStack, setSocketFactory, setUpProtocol, setValue, setValues, statsEnabled, up, upThreadEnabled
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail


protected bsh.Interpreter interpreter


protected srv_sock


protected java.lang.Thread acceptor


protected final java.util.List<> sockets
Constructor Detail


public BSH()
Method Detail


public void start()
           throws java.lang.Exception
Description copied from class: Protocol
This method is called on a Channel.connect(String). Starts work. Protocols are connected and queues are ready to receive events. Will be called from bottom to top. This call will replace the START and START_OK events.

start in class Protocol
java.lang.Exception - Thrown if protocol cannot be started successfully. This will cause the ProtocolStack to fail, so Channel.connect(String) will throw an exception


public void stop()
Description copied from class: Protocol
This method is called on a Channel.disconnect(). Stops work (e.g. by closing multicast socket). Will be called from top to bottom. This means that at the time of the method invocation the neighbor protocol below is still working. This method will replace the STOP, STOP_OK, CLEANUP and CLEANUP_OK events. The ProtocolStack guarantees that when this method is called all messages in the down queue will have been flushed

stop in class Protocol


public void run()
Specified by:
run in interface java.lang.Runnable

Copyright © 1998-2009 Bela Ban / Red Hat. All Rights Reserved.