|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecttigase.cluster.VirtualComponent
public class VirtualComponent
The purpose of this component implementation is to forward packets to a target
real component implementation in the cluster installation. Let's say you have
a cluster installation with full Tigase server installed on each node and you
also want to use a component which doesn't have clustered implementation yet.
In such case you deploy the component on one of the cluster nodes and put the
virtual component on all other nodes. With proper configuration they pretend
to be the component returning a correct service disco information and forward
all packets for this component to a cluster node with real component running.
This is a very lightweight implementation which doesn't use much resources
either memory or CPU.
It can work well for any kind of a component: MUC, PubSub, transport either
native Tigase components or third-party components connected via XEP-0114 -
external protocol component.
Basic configuration parameters are actually the same as for a real component.
You set a real component name as a name for the virtual component and a vritual
component class name to load. Let's say we want to deploy MUC component this
way. The MUC component is visible as muc.domain.our in our
installation. Thus the name of the component is: muc:
--comp-name-1=muc --comp-class-1=tigase.cluster.VirtualComponentThis is pretty much all you need to load a virtual component. A few other options are needed to point to correct destination addresses for forwarded packets and to set correct service discovery parameters:
muc/redirect-to=muc@cluster-node-with-real-muc.domain.our muc/disco-name=Multi User Chat muc/disco-node= muc/disco-type=text muc/disco-category=conference muc/disco-features=http://jabber.org/protocol/mucAbove options set all possible parameters to setup virtual MUC component. Created: Dec 13, 2008 7:44:35 PM
| Field Summary | |
|---|---|
static java.lang.String |
DISCO_CATEGORY_PROP_KEY
Parameter to set service discovery item category name for the virtual component. |
static java.lang.String |
DISCO_CATEGORY_PROP_VAL
Field description |
static java.lang.String |
DISCO_FEATURES_PROP_KEY
Comma separated list of features for the service discovery item reprezented by this virtual component. |
static java.lang.String |
DISCO_FEATURES_PROP_VAL
Field description |
static java.lang.String |
DISCO_NAME_PROP_KEY
Parameter to set service discovery item name for the virtual component instance. |
static java.lang.String |
DISCO_NAME_PROP_VAL
Field description |
static java.lang.String |
DISCO_NODE_PROP_KEY
Parameter to set service discovery node name. |
static java.lang.String |
DISCO_NODE_PROP_VAL
Field description |
static java.lang.String |
DISCO_TYPE_PROP_KEY
Parameter to set service discovery item type for the virtual component. |
static java.lang.String |
DISCO_TYPE_PROP_VAL
Field description |
static java.lang.String |
REDIRECT_TO_PROP_KEY
Virtual component parameter setting packet redirect destination address. |
| Fields inherited from interface tigase.disco.XMPPService |
|---|
CMD_FEATURES, DEF_FEATURES, INFO_XMLNS, ITEMS_XMLNS |
| Constructor Summary | |
|---|---|
VirtualComponent()
|
|
| Method Summary | |
|---|---|
tigase.xmpp.JID |
getComponentId()
Method description |
java.util.Map<java.lang.String,java.lang.Object> |
getDefaults(java.util.Map<java.lang.String,java.lang.Object> params)
Method description |
java.util.List<tigase.xml.Element> |
getDiscoFeatures(tigase.xmpp.JID from)
Method description |
tigase.xml.Element |
getDiscoInfo(java.lang.String node,
tigase.xmpp.JID jid,
tigase.xmpp.JID from)
Method description |
java.util.List<tigase.xml.Element> |
getDiscoItems(java.lang.String node,
tigase.xmpp.JID jid,
tigase.xmpp.JID from)
Method description |
java.lang.String |
getName()
Method description |
void |
initializationCompleted()
Method description |
void |
processPacket(Packet packet,
java.util.Queue<Packet> results)
Method description |
void |
release()
Method description |
void |
setName(java.lang.String name)
Method description |
void |
setProperties(java.util.Map<java.lang.String,java.lang.Object> properties)
Method description |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String REDIRECT_TO_PROP_KEY
public static final java.lang.String DISCO_NAME_PROP_KEY
public static final java.lang.String DISCO_NAME_PROP_VAL
public static final java.lang.String DISCO_NODE_PROP_KEY
public static final java.lang.String DISCO_NODE_PROP_VAL
public static final java.lang.String DISCO_TYPE_PROP_KEY
public static final java.lang.String DISCO_TYPE_PROP_VAL
public static final java.lang.String DISCO_CATEGORY_PROP_KEY
public static final java.lang.String DISCO_CATEGORY_PROP_VAL
public static final java.lang.String DISCO_FEATURES_PROP_KEY
public static final java.lang.String DISCO_FEATURES_PROP_VAL
| Constructor Detail |
|---|
public VirtualComponent()
| Method Detail |
|---|
public tigase.xmpp.JID getComponentId()
getComponentId in interface ServerComponentpublic java.util.Map<java.lang.String,java.lang.Object> getDefaults(java.util.Map<java.lang.String,java.lang.Object> params)
getDefaults in interface Configurableparams -
public java.util.List<tigase.xml.Element> getDiscoFeatures(tigase.xmpp.JID from)
getDiscoFeatures in interface XMPPServicefrom -
public tigase.xml.Element getDiscoInfo(java.lang.String node,
tigase.xmpp.JID jid,
tigase.xmpp.JID from)
getDiscoInfo in interface XMPPServicenode - jid - from -
public java.util.List<tigase.xml.Element> getDiscoItems(java.lang.String node,
tigase.xmpp.JID jid,
tigase.xmpp.JID from)
getDiscoItems in interface XMPPServicenode - jid - from -
public java.lang.String getName()
getName in interface ServerComponentpublic void initializationCompleted()
initializationCompleted in interface ServerComponent
public void processPacket(Packet packet,
java.util.Queue<Packet> results)
processPacket in interface ServerComponentpacket - results - public void release()
release in interface ServerComponentpublic void setName(java.lang.String name)
setName in interface ServerComponentname - public void setProperties(java.util.Map<java.lang.String,java.lang.Object> properties)
setProperties in interface Configurableproperties -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||