org.jgroups.protocols
public abstract class TP extends Protocol
(byte[], int, int)
(org.jgroups.Address, byte[], int, int)
(Address, Address, byte[], int, int)
method must
be called by subclasses when a unicast or multicast message has been received.Version: $Id: TP.java,v 1.53.2.1 2006/05/16 04:20:38 belaban Exp $
Constructor Summary | |
---|---|
protected | TP()
Creates the TP protocol, and initializes the
state variables, does however not start any sockets or threads. |
Method Summary | |
---|---|
void | down(Event evt)
Caller by the layer above this layer. |
Map | dumpStats() |
String | getBindAddress() |
boolean | getBindToAllInterfaces() |
String | getChannelName() |
int | getIncomingQueueSize() |
abstract String | getInfo() |
Address | getLocalAddress() |
int | getMaxBundleSize() |
long | getMaxBundleTimeout() |
long | getNumBytesReceived() |
long | getNumBytesSent() |
long | getNumMessagesReceived() |
long | getNumMessagesSent() |
int | getOutgoingQueueMaxSize() |
int | getOutgoingQueueSize() |
List | getReceiveInterfaces() |
List | getSendInterfaces() |
protected void | handleConfigEvent(HashMap map) |
protected void | handleDownEvent(Event evt) |
boolean | isDiscardIncompatiblePackets() |
boolean | isEnableBundling() |
boolean | isLoopback() |
boolean | isReceiveOnAllInterfaces() |
boolean | isSendOnAllInterfaces() |
boolean | isUseIncomingPacketHandler() |
boolean | isUseOutgoingPacketHandler() |
abstract void | postUnmarshalling(Message msg, Address dest, Address src, boolean multicast) |
abstract void | postUnmarshallingList(Message msg, Address dest, boolean multicast) |
protected void | receive(Address dest, Address sender, byte[] data, int offset, int length)
Subclasses must call this method when a unicast or multicast message has been received.
|
void | resetStats() |
abstract void | sendToAllMembers(byte[] data, int offset, int length)
Send to all members in the group. |
abstract void | sendToSingleMember(Address dest, byte[] data, int offset, int length)
Send to all members in the group. |
void | setBindAddress(String bind_addr) |
void | setBindToAllInterfaces(boolean flag) |
void | setDiscardIncompatiblePackets(boolean flag) |
void | setEnableBundling(boolean flag) |
void | setLoopback(boolean b) |
void | setMaxBundleSize(int size) |
void | setMaxBundleTimeout(long timeout) |
void | setOutgoingQueueMaxSize(int new_size) |
boolean | setProperties(Properties props)
Setup the Protocol instance according to the configuration string |
void | start()
Creates the unicast and multicast sockets and starts the unicast and multicast receiver threads |
void | startUpHandler()
This prevents the up-handler thread to be created, which essentially is superfluous:
messages are received from the network rather than from a layer below.
|
void | stop() |
String | toString()
debug only |
void | up(Event evt)
handle the UP event. |
Deprecated: Use isReceiveOnAllInterfaces instead
Parameters: dest sender data offset length
Parameters: data The data to be sent. This is not a copy, so don't modify it offset length
Throws: Exception
Parameters: dest Must be a non-null unicast address data The data to be sent. This is not a copy, so don't modify it offset length
Throws: Exception
Returns: true if no other properties are left. false if the properties still have data in them, ie , properties are left over and not handled by the protocol stack
Parameters: evt - the event being send from the stack