|
||||||||||
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 String |
DISCO_CATEGORY_PROP_KEY
Parameter to set service discovery item category name for the virtual component. |
static String |
DISCO_CATEGORY_PROP_VAL
Field description |
static String |
DISCO_FEATURES_PROP_KEY
Comma separated list of features for the service discovery item reprezented by this virtual component. |
static String |
DISCO_FEATURES_PROP_VAL
Field description |
static String |
DISCO_NAME_PROP_KEY
Parameter to set service discovery item name for the virtual component instance. |
static String |
DISCO_NAME_PROP_VAL
Field description |
static String |
DISCO_NODE_PROP_KEY
Parameter to set service discovery node name. |
static String |
DISCO_NODE_PROP_VAL
Field description |
static String |
DISCO_TYPE_PROP_KEY
Parameter to set service discovery item type for the virtual component. |
static String |
DISCO_TYPE_PROP_VAL
Field description |
static 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 |
Map<String,Object> |
getDefaults(Map<String,Object> params)
Method description |
List<tigase.xml.Element> |
getDiscoFeatures(tigase.xmpp.JID from)
Method description |
tigase.xml.Element |
getDiscoInfo(String node,
tigase.xmpp.JID jid,
tigase.xmpp.JID from)
Method description |
List<tigase.xml.Element> |
getDiscoItems(String node,
tigase.xmpp.JID jid,
tigase.xmpp.JID from)
Method description |
String |
getName()
Method description |
void |
initializationCompleted()
Method description |
void |
processPacket(Packet packet,
Queue<Packet> results)
Method description |
void |
release()
Method description |
void |
setName(String name)
Method description |
void |
setProperties(Map<String,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 String REDIRECT_TO_PROP_KEY
public static final String DISCO_NAME_PROP_KEY
public static final String DISCO_NAME_PROP_VAL
public static final String DISCO_NODE_PROP_KEY
public static final String DISCO_NODE_PROP_VAL
public static final String DISCO_TYPE_PROP_KEY
public static final String DISCO_TYPE_PROP_VAL
public static final String DISCO_CATEGORY_PROP_KEY
public static final String DISCO_CATEGORY_PROP_VAL
public static final String DISCO_FEATURES_PROP_KEY
public static final String DISCO_FEATURES_PROP_VAL
Constructor Detail |
---|
public VirtualComponent()
Method Detail |
---|
public tigase.xmpp.JID getComponentId()
getComponentId
in interface ServerComponent
public Map<String,Object> getDefaults(Map<String,Object> params)
getDefaults
in interface Configurable
params
-
public List<tigase.xml.Element> getDiscoFeatures(tigase.xmpp.JID from)
getDiscoFeatures
in interface XMPPService
from
-
public tigase.xml.Element getDiscoInfo(String node, tigase.xmpp.JID jid, tigase.xmpp.JID from)
getDiscoInfo
in interface XMPPService
node
- jid
- from
-
public List<tigase.xml.Element> getDiscoItems(String node, tigase.xmpp.JID jid, tigase.xmpp.JID from)
getDiscoItems
in interface XMPPService
node
- jid
- from
-
public String getName()
getName
in interface ServerComponent
public void initializationCompleted()
initializationCompleted
in interface ServerComponent
public void processPacket(Packet packet, Queue<Packet> results)
processPacket
in interface ServerComponent
packet
- results
- public void release()
release
in interface ServerComponent
public void setName(String name)
setName
in interface ServerComponent
name
- public void setProperties(Map<String,Object> properties)
setProperties
in interface Configurable
properties
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |