|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exoplatform.services.jcr.ext.replication.ChannelManager
public class ChannelManager
Created by The eXo Platform SAS.
| Nested Class Summary | |
|---|---|
protected class |
ChannelManager.PacketHandler
PacketHandler. |
| Field Summary | |
|---|---|
static int |
CONNECTED
The connected state. |
static int |
DISCONNECTED
The disconnected state. |
static int |
INITIALIZED
The initialized state. |
protected ChannelManager.PacketHandler |
packetsHandler
Packets handler. |
protected int |
state
State of async channel manager {INITIALIZED, CONNECTED, DISCONNECTED}. |
| Constructor Summary | |
|---|---|
ChannelManager(java.lang.String channelConfig,
java.lang.String channelName)
ChannelManager constructor. |
|
| Method Summary | |
|---|---|
void |
addPacketListener(PacketListener packetListener)
addPacketListener. |
void |
closeChannel()
closeChannel. |
void |
connect()
connect. |
org.jgroups.JChannel |
getChannel()
getChannel. |
org.jgroups.blocks.MessageDispatcher |
getDispatcher()
getDispatcher. |
java.lang.Object |
handle(org.jgroups.Message message)
|
void |
init()
init. |
boolean |
isConnected()
Tell if manager is connected to the channel and ready to work. |
void |
send(byte[] buffer)
send. |
void |
sendBigPacket(byte[] data,
Packet packet)
sendBigPacket. |
void |
sendBinaryFile(java.lang.String filePath,
java.lang.String ownerName,
java.lang.String identifier,
java.lang.String systemId,
int firstPacketType,
int middlePocketType,
int lastPocketType)
sendBinaryFile. |
void |
sendPacket(Packet packet)
sendPacket. |
void |
setAllowConnect(boolean allowConnect)
setAllowConnect. |
void |
setAllowConnect(boolean allowConnect,
int id)
setAllowConnect. |
void |
setChannelListener(org.jgroups.ChannelListener channelListener)
setChannelListener. |
void |
setMembershipListener(org.jgroups.MembershipListener membershipListener)
setMembershipListener. |
void |
setMessageListener(org.jgroups.MessageListener messageListener)
setMessageListener. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int INITIALIZED
public static final int CONNECTED
public static final int DISCONNECTED
protected int state
protected final ChannelManager.PacketHandler packetsHandler
| Constructor Detail |
|---|
public ChannelManager(java.lang.String channelConfig,
java.lang.String channelName)
channelConfig - channel configurationchannelName - name of channel| Method Detail |
|---|
public boolean isConnected()
public void init()
throws ReplicationException
ReplicationException - Will be generated the ReplicationException.
public void connect()
throws ReplicationException
ReplicationException - Will be generated the ReplicationException.public void closeChannel()
public void setMembershipListener(org.jgroups.MembershipListener membershipListener)
membershipListener - set the MembershipListenerpublic void setMessageListener(org.jgroups.MessageListener messageListener)
messageListener - set the MessageListenerpublic void addPacketListener(PacketListener packetListener)
packetListener - add the PacketListenerpublic void setChannelListener(org.jgroups.ChannelListener channelListener)
channelListener - set the ChannelListenerpublic org.jgroups.blocks.MessageDispatcher getDispatcher()
public void sendPacket(Packet packet)
throws java.lang.Exception
packet - the Packet with content
java.lang.Exception - will be generated Exceptionpublic org.jgroups.JChannel getChannel()
public void send(byte[] buffer)
buffer - the binary data
public void sendBigPacket(byte[] data,
Packet packet)
throws java.lang.Exception
data - the binary datapacket - the Packet
java.lang.Exception - will be generated Exception
public void sendBinaryFile(java.lang.String filePath,
java.lang.String ownerName,
java.lang.String identifier,
java.lang.String systemId,
int firstPacketType,
int middlePocketType,
int lastPocketType)
throws java.lang.Exception
filePath - full path to fileownerName - owner nameidentifier - the identifier StringsystemId - system identifications IDfirstPacketType - the packet type for first packetmiddlePocketType - the packet type for middle packetslastPocketType - the packet type for last packet
java.lang.Exception - will be generated the Exceptionpublic java.lang.Object handle(org.jgroups.Message message)
handle in interface org.jgroups.blocks.RequestHandlerpublic void setAllowConnect(boolean allowConnect)
allowConnect - allow connection state(true or false)
public void setAllowConnect(boolean allowConnect,
int id)
allowConnect - allow connection state(true or false)id - channel id
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||