Package org.jgroups.protocols
Class BSH
java.lang.Object
org.jgroups.stack.Protocol
org.jgroups.protocols.BSH
- All Implemented Interfaces:
Runnable
Beanshell (www.beanshell.org) 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
- Author:
- Bela Ban
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Threadprotected bsh.Interpreterprotected ServerSocket -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidrun()voidstart()This method is called on aChannel.connect(String).voidstop()This method is called on aChannel.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
-
Field Details
-
interpreter
protected bsh.Interpreter interpreter -
srv_sock
-
acceptor
-
sockets
-
-
Constructor Details
-
BSH
public BSH()
-
-
Method Details
-
start
Description copied from class:ProtocolThis method is called on aChannel.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.- Overrides:
startin classProtocol- Throws:
Exception- Thrown if protocol cannot be started successfully. This will cause the ProtocolStack to fail, soChannel.connect(String)will throw an exception
-
stop
public void stop()Description copied from class:ProtocolThis method is called on aChannel.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 -
run
public void run()
-