org.apache.catalina.cluster
Interface ClusterSender

All Known Implementing Classes:
MulticastSender

public interface ClusterSender

This class is responsible for sending outgoing packets to a Cluster. Different Implementations may use different protocol to communicate within the Cluster.

Version:
$Revision: 466595 $, $Date: 2006-10-21 23:24:41 +0100 (Sat, 21 Oct 2006) $
Author:
Bip Thelin

Method Summary
 int getDebug()
          Get the debug level for this component
 Logger getLogger()
          Get the Logger for this component
 java.lang.String getSenderId()
          get the senderId used to identify messages being sent in a Cluster.
 void log(java.lang.String message)
          The log method to use in the implementation
 void send(byte[] b)
          Send an array of bytes, the implementation of this ClusterSender is responsible for modifying the bytearray to something that it can use.
 void send(java.lang.Object o)
          Send an object, the implementation of this ClusterSender is responsible for modifying the Object to something that it can use.
 void setDebug(int debug)
          Set the debug detail level for this component.
 void setLogger(Logger logger)
          Set the Logger for this component.
 void setSenderId(java.lang.String senderId)
          The senderId is a identifier used to identify different packages being sent in a Cluster.
 

Method Detail

setSenderId

public void setSenderId(java.lang.String senderId)
The senderId is a identifier used to identify different packages being sent in a Cluster. Each package sent through the concrete implementation of this interface will have the senderId set at runtime. Usually the senderId is the name of the component that is using this ClusterSender

Parameters:
senderId - The senderId to use

getSenderId

public java.lang.String getSenderId()
get the senderId used to identify messages being sent in a Cluster.

Returns:
The senderId for this ClusterSender

setDebug

public void setDebug(int debug)
Set the debug detail level for this component.

Parameters:
debug - The debug level

getDebug

public int getDebug()
Get the debug level for this component

Returns:
The debug level

setLogger

public void setLogger(Logger logger)
Set the Logger for this component.

Parameters:
logger - The Logger to use with this component.

getLogger

public Logger getLogger()
Get the Logger for this component

Returns:
The Logger associated with this component.

log

public void log(java.lang.String message)
The log method to use in the implementation

Parameters:
message - The message to be logged.

send

public void send(byte[] b)
Send an array of bytes, the implementation of this ClusterSender is responsible for modifying the bytearray to something that it can use. Before anything is sent it is transformed into a ReplicationWrapper object and the right senderId is set.

Parameters:
b - the bytearray to send

send

public void send(java.lang.Object o)
Send an object, the implementation of this ClusterSender is responsible for modifying the Object to something that it can use. Before anything is sent it is transformed into a ReplicationWrapper object and the right senderId is set.

Parameters:
o - The object to send


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