Apache Tomcat 7.0.28

org.apache.catalina.tribes.transport
Class ReplicationTransmitter

java.lang.Object
  extended by org.apache.catalina.tribes.transport.ReplicationTransmitter
All Implemented Interfaces:
ChannelSender, Heartbeat

public class ReplicationTransmitter
extends Object
implements ChannelSender

Transmit message to other cluster members Actual senders are created based on the replicationMode type

Version:
$Id: ReplicationTransmitter.java 1142666 2011-07-04 13:54:52Z kkolinko $
Author:
Filip Hanik

Field Summary
protected static StringManager sm
          The string manager for this package.
 
Constructor Summary
ReplicationTransmitter()
           
 
Method Summary
 void add(Member member)
          add new cluster member and create sender ( s. replicationMode) transfer current properties to sender
 String getInfo()
          Return descriptive information about this implementation and the corresponding version number, in the format <description>/<version>.
 MultiPointSender getTransport()
           
 void heartbeat()
          Call transmitter to check for sender socket status
 void remove(Member member)
          remove sender from transmitter. ( deregister mbean and disconnect sender )
 void sendMessage(ChannelMessage message, Member[] destination)
          Send data to one member
 void setTransport(MultiPointSender transport)
           
 void start()
          start the sender and register transmitter mbean
 void stop()
          stop the sender and deregister mbeans (transmitter, senders)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sm

protected static final StringManager sm
The string manager for this package.

Constructor Detail

ReplicationTransmitter

public ReplicationTransmitter()
Method Detail

getInfo

public String getInfo()
Return descriptive information about this implementation and the corresponding version number, in the format <description>/<version>.


getTransport

public MultiPointSender getTransport()

setTransport

public void setTransport(MultiPointSender transport)

sendMessage

public void sendMessage(ChannelMessage message,
                        Member[] destination)
                 throws ChannelException
Send data to one member

Specified by:
sendMessage in interface ChannelSender
Parameters:
message - ChannelMessage - the message to be sent
destination - Member[] - the destinations
Throws:
ChannelException - - if an error happens, the ChannelSender MUST report individual send failures on a per member basis, using ChannelException.addFaultyMember
See Also:
ChannelSender.sendMessage(org.apache.catalina.tribes.ChannelMessage, org.apache.catalina.tribes.Member[])

start

public void start()
           throws IOException
start the sender and register transmitter mbean

Specified by:
start in interface ChannelSender
Throws:
IOException - if preprocessing takes place and an error happens
See Also:
ChannelSender.start()

stop

public void stop()
stop the sender and deregister mbeans (transmitter, senders)

Specified by:
stop in interface ChannelSender
See Also:
ChannelSender.stop()

heartbeat

public void heartbeat()
Call transmitter to check for sender socket status

Specified by:
heartbeat in interface ChannelSender
Specified by:
heartbeat in interface Heartbeat
See Also:
SimpleTcpCluster.backgroundProcess()

add

public void add(Member member)
add new cluster member and create sender ( s. replicationMode) transfer current properties to sender

Specified by:
add in interface ChannelSender
Parameters:
member - Member
See Also:
ChannelSender.add(org.apache.catalina.tribes.Member)

remove

public void remove(Member member)
remove sender from transmitter. ( deregister mbean and disconnect sender )

Specified by:
remove in interface ChannelSender
Parameters:
member - Member
See Also:
ChannelSender.remove(org.apache.catalina.tribes.Member)

Apache Tomcat 7.0.28

Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.