Logo Search packages:      
Sourcecode: libjgroups-java version File versions

org::jgroups::stack::ProtocolStack Class Reference

Inheritance diagram for org::jgroups::stack::ProtocolStack:

org::jgroups::stack::Protocol org::jgroups::Transport

List of all members.


Detailed Description

A ProtocolStack manages a number of protocols layered above each other. It creates all protocol classes, initializes them and, when ready, starts all of them, beginning with the bottom most protocol. It also dispatches messages received from the stack to registered objects (e.g. channel, GMP) and sends messages sent by those objects down the stack.

The ProtocolStack makes use of the Configurator to setup and initialize stacks, and to destroy them again when not needed anymore

Author:
Bela Ban
Version:
Id
ProtocolStack.java,v 1.59.2.8 2008/06/09 09:40:56 belaban Exp

Definition at line 24 of file ProtocolStack.java.


Public Member Functions

Protocol createProtocol (String prot_spec) throws Exception
void destroy ()
Object down (Event evt)
boolean downThreadEnabled ()
Map< String, Object > dumpStats ()
String dumpTimerQueue ()
void enableStats (boolean flag)
Protocol findProtocol (Class<?> clazz)
Protocol findProtocol (String name)
void flushEvents ()
Channel getChannel ()
Protocol getDownProtocol ()
Map< Thread, ReentrantLock > getLocks ()
String getName ()
Properties getProperties ()
Vector< ProtocolgetProtocols ()
ProtocolStack getProtocolStack ()
ThreadFactory getThreadFactory ()
int getTimerThreads ()
TP getTransport ()
Protocol getUpProtocol ()
void init () throws Exception
void insertProtocol (Protocol prot, int position, Class<?extends Protocol > neighbor_prot) throws Exception
void insertProtocol (Protocol prot, int position, String neighbor_prot) throws Exception
String printProtocolSpec (boolean include_properties)
String printProtocolSpecAsPlainString ()
String printProtocolSpecAsXML ()
String printStats ()
 ProtocolStack () throws ChannelException
 ProtocolStack (JChannel channel, String setup_string) throws ChannelException
Vector< Integer > providedDownServices ()
Vector< Integer > providedUpServices ()
Object receive (long timeout) throws Exception
Protocol removeProtocol (String prot_name) throws Exception
Vector< Integer > requiredDownServices ()
Vector< Integer > requiredUpServices ()
void resetStats ()
void send (Message msg) throws Exception
void setDownProtocol (Protocol down_prot)
boolean setProperties (Properties props)
boolean setPropertiesInternal (Properties props)
void setProtocolStack (ProtocolStack stack)
void setThreadFactory (ThreadFactory f)
void setup () throws Exception
void setUpProtocol (Protocol up_prot)
void start () throws Exception
void startStack (String cluster_name) throws Exception
boolean statsEnabled ()
void stop ()
void stopStack (String cluster_name)
Object up (Event evt)
boolean upThreadEnabled ()

Static Public Member Functions

static ConcurrentMap< String,
Tuple< TP, Short > > 
getSingletonTransports ()
static ThreadFactory getTimerThreadFactory ()
static void setTimerThreadFactory (ThreadFactory f)

Static Public Attributes

static final int ABOVE = 1
static final int BELOW = 2

Protected Attributes

Protocol down_prot = null
final Log log = LogFactory.getLog(this.getClass())
final Properties props = new Properties()
ProtocolStack stack = null
boolean stats = true
Protocol up_prot = null

Private Attributes

Protocol bottom_prot = null
JChannel channel = null
final Map< Thread, ReentrantLock > locks = new ConcurrentHashMap<Thread,ReentrantLock>()
String setup_string
volatile boolean stopped = true
Protocol top_prot = null

Static Private Attributes

static final ConcurrentMap
< String, Tuple< TP, Short > > 
singleton_transports = new ConcurrentHashMap<String,Tuple<TP,Short>>()

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index