
public class JGroupsCommunicationConnector extends Object implements CommunicationConnector, org.jgroups.Receiver, org.jgroups.blocks.RequestHandler, org.jgroups.MembershipListener
| Constructor and Description |
|---|
JGroupsCommunicationConnector(ModuleContext context) |
| Modifier and Type | Method and Description |
|---|---|
void |
block() |
void |
configureConnector(List<ChannelDescriptor> channels,
String peerName)
Configure the connector
|
void |
dispose() |
void |
dispose(List<ChannelDescriptor> channels)
Reset the CommunicationConnector
|
String |
getDescription() |
List<String> |
getGroupMembers(String groupName)
Remember that group is the name of the broker, but the name of the
channel is X+Y where: X :brokerName Y: SpaceID
|
String |
getName() |
String |
getProvider() |
void |
getState(OutputStream output) |
String |
getVersion() |
Object |
handle(org.jgroups.Message msg) |
boolean |
hasChannel(String channelName)
This method checks if the communication connector provides a channel with
the name specified.
|
boolean |
init() |
void |
loadConfigurations(Dictionary configurations)
This method allows the connector to obtain all the required
configurations
|
void |
multicast(ChannelMessage message)
Send multicast message to a group (Broadcast)
|
void |
multicast(ChannelMessage message,
List<PeerCard> receivers)
Send multicast message to a list of recipients in the same group
|
void |
receive(org.jgroups.Message msg) |
void |
setDescription(String description) |
void |
setName(String name) |
void |
setProvider(String provider) |
void |
setState(InputStream input) |
void |
setVersion(String version) |
void |
suspect(org.jgroups.Address suspectedMbr) |
String |
toString() |
void |
unblock() |
void |
unicast(ChannelMessage message,
String receiver)
Send unicast message to one recipient
|
void |
viewAccepted(org.jgroups.View newView) |
public JGroupsCommunicationConnector(ModuleContext context) throws Exception
Exceptionpublic void configureConnector(List<ChannelDescriptor> channels, String peerName) throws CommunicationConnectorException
CommunicationConnectorconfigureConnector in interface CommunicationConnectorCommunicationConnectorExceptionpublic void dispose(List<ChannelDescriptor> channels)
CommunicationConnectordispose in interface CommunicationConnectorchannels - Channels to resetpublic void unicast(ChannelMessage message, String receiver) throws CommunicationConnectorException
CommunicationConnectorunicast in interface CommunicationConnectorCommunicationConnectorExceptionpublic void multicast(ChannelMessage message) throws CommunicationConnectorException
CommunicationConnectormulticast in interface CommunicationConnectorCommunicationConnectorExceptionpublic void multicast(ChannelMessage message, List<PeerCard> receivers) throws CommunicationConnectorException
CommunicationConnectormulticast in interface CommunicationConnectorCommunicationConnectorExceptionpublic void loadConfigurations(Dictionary configurations)
ConnectorloadConfigurations in interface Connectorpublic String getVersion()
getVersion in interface Connectorpublic String getDescription()
getDescription in interface Connectorpublic String getProvider()
getProvider in interface Connectorpublic void setName(String name)
public void setVersion(String version)
public void setDescription(String description)
public void setProvider(String provider)
public void receive(org.jgroups.Message msg)
receive in interface org.jgroups.MessageListenerpublic void getState(OutputStream output) throws Exception
getState in interface org.jgroups.MessageListenerExceptionpublic void setState(InputStream input) throws Exception
setState in interface org.jgroups.MessageListenerExceptionpublic void block()
block in interface org.jgroups.MembershipListenerpublic void suspect(org.jgroups.Address suspectedMbr)
suspect in interface org.jgroups.MembershipListenerpublic void unblock()
unblock in interface org.jgroups.MembershipListenerpublic void viewAccepted(org.jgroups.View newView)
viewAccepted in interface org.jgroups.MembershipListenerpublic String toString()
toString in interface CommunicationConnectortoString in class Objectpublic Object handle(org.jgroups.Message msg) throws Exception
handle in interface org.jgroups.blocks.RequestHandlerExceptionpublic List<String> getGroupMembers(String groupName)
getGroupMembers in interface CommunicationConnectorpublic boolean hasChannel(String channelName)
CommunicationConnectorhasChannel in interface CommunicationConnectorCopyright © 2018 universAAL Consortium. All rights reserved.