org.jgroups.protocols
Class DUMMY_TP

java.lang.Object
  extended by org.jgroups.stack.Protocol
      extended by org.jgroups.protocols.DUMMY_TP

public class DUMMY_TP
extends Protocol

Dummy transport, returns a fake local address and responds to CONNECT. Compared to LOOPBACK, this discards everything

Version:
$Id: DUMMY_TP.java,v 1.8 2008/10/21 12:10:30 vlada Exp $
Author:
Bela Ban

Field Summary
 
Fields inherited from class org.jgroups.stack.Protocol
down_prot, log, stack, stats, up_prot
 
Constructor Summary
DUMMY_TP()
           
 
Method Summary
 java.lang.Object down(Event evt)
          Caller by the layer above this layer.
 java.lang.String getName()
          All protocol names have to be unique !
 void init()
          Called after instance has been created (null constructor) and before protocol is started.
 void start()
          This method is called on a Channel.connect(String).
 java.lang.String toString()
           
 
Methods inherited from class org.jgroups.stack.Protocol
destroy, downThreadEnabled, dumpStats, enableStats, getConfigurableObjects, getDownProtocol, getProperties, getProtocolStack, getThreadFactory, getTransport, getUpProtocol, printStats, providedDownServices, providedUpServices, requiredDownServices, requiredUpServices, resetStats, setDownProtocol, setProperties, setPropertiesInternal, setProperty, setProtocolStack, setUpProtocol, statsEnabled, stop, up, upThreadEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DUMMY_TP

public DUMMY_TP()
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getName

public java.lang.String getName()
Description copied from class: Protocol
All protocol names have to be unique !

Specified by:
getName in class Protocol

init

public void init()
          throws java.lang.Exception
Description copied from class: Protocol
Called after instance has been created (null constructor) and before protocol is started. Properties are already set. Other protocols are not yet connected and events cannot yet be sent.

Overrides:
init in class Protocol
Throws:
java.lang.Exception - Thrown if protocol cannot be initialized successfully. This will cause the ProtocolStack to fail, so the channel constructor will throw an exception

start

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.

Overrides:
start in class Protocol
Throws:
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

down

public java.lang.Object down(Event evt)
Caller by the layer above this layer. Usually we just put this Message into the send queue and let one or more worker threads handle it. A worker thread then removes the Message from the send queue, performs a conversion and adds the modified Message to the send queue of the layer below it, by calling Down).

Overrides:
down in class Protocol


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