FileDocCategorySizeDatePackage
ReplicationTransmitter.javaAPI DocApache Tomcat 6.0.144474Fri Jul 20 04:20:32 BST 2007org.apache.catalina.tribes.transport

ReplicationTransmitter

public class ReplicationTransmitter extends Object implements org.apache.catalina.tribes.ChannelSender
Transmit message to other cluster members Actual senders are created based on the replicationMode type
author
Filip Hanik
version
$Revision: 532800 $ $Date: 2007-04-26 18:52:29 +0200 (jeu., 26 avr. 2007) $

Fields Summary
private static org.apache.juli.logging.Log
log
private static final String
info
The descriptive information about this implementation.
protected org.apache.catalina.tribes.util.StringManager
sm
The string manager for this package.
private MultiPointSender
transport
Constructors Summary
public ReplicationTransmitter()


    

      
    
Methods Summary
public synchronized voidadd(org.apache.catalina.tribes.Member member)
add new cluster member and create sender ( s. replicationMode) transfer current properties to sender

see
org.apache.catalina.tribes.ClusterSender#add(org.apache.catalina.tribes.Member)

        getTransport().add(member);
    
public java.lang.StringgetInfo()
Return descriptive information about this implementation and the corresponding version number, in the format <description>/<version>.


                        
       
        return (info);
    
public MultiPointSendergetTransport()

        return transport;
    
public voidheartbeat()
Call transmitter to check for sender socket status

see
SimpleTcpCluster#backgroundProcess()

        if (getTransport()!=null) getTransport().keepalive();
    
public synchronized voidremove(org.apache.catalina.tribes.Member member)
remove sender from transmitter. ( deregister mbean and disconnect sender )

see
org.apache.catalina.tribes.ClusterSender#remove(org.apache.catalina.tribes.Member)

        getTransport().remove(member);
    
public voidsendMessage(org.apache.catalina.tribes.ChannelMessage message, org.apache.catalina.tribes.Member[] destination)
Send data to one member

see
org.apache.catalina.tribes.ClusterSender#sendMessage(org.apache.catalina.tribes.ClusterMessage, org.apache.catalina.tribes.Member)

        MultiPointSender sender = getTransport();
        sender.sendMessage(destination,message);
    
public voidsetTransport(MultiPointSender transport)

        this.transport = transport;
    
public voidstart()
start the sender and register transmitter mbean

see
org.apache.catalina.tribes.ClusterSender#start()

        getTransport().connect();
    
public synchronized voidstop()

        getTransport().disconnect();