|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecttigase.server.BasicComponent
tigase.server.AbstractMessageReceiver
tigase.server.sreceiver.StanzaReceiver
public class StanzaReceiver
This is a sibbling of StanzaSender class and offers just
an opposite functionaity. It can receive XMPP packets to do something
with them. And what to do it depends on the destination address.
Destination address points to certain receiver task and this is up
to task to decide what to do with the stanza. Task address is just a
usuall Jabber ID: task-short-name@srec.tigase.org.
Like public chat rooms in MUC tasks can be preconfigured
in the StanzaReceiver configuration or can be created on
demand using ad-hoc commands and service-discovery.
User can subscribe to some tasks and can add them to the roster just like
a normal contacts. This allows to use the functionality from all existing
clients without implementing any special protocols or extensions.
Possible tasks are:
Task creation parameters:
ad-hoc
commands should present available tasks types which can be created.
User can select a task to create. There may be some restrictions on
tasks creation like certain types can be created only by server
administrator or some tasks types can be created only once on single
server and so on.subscrive presence is sent to these users and they can
accept the subscription or not.chat, headline or normal.all, subscribed,
owner, listCreated: Wed May 9 08:27:22 2007
| Field Summary | |
|---|---|
static java.lang.String |
MY_DOMAIN_NAME_PROP_KEY
Field description |
static java.lang.String |
MY_DOMAIN_NAME_PROP_VAL
Field description |
| Fields inherited from class tigase.server.AbstractMessageReceiver |
|---|
HOUR, INCOMING_FILTERS_PROP_KEY, INCOMING_FILTERS_PROP_VAL, MAX_QUEUE_SIZE_PROP_KEY, MAX_QUEUE_SIZE_PROP_VAL, maxQueueSize, MINUTE, OUTGOING_FILTERS_PROP_KEY, OUTGOING_FILTERS_PROP_VAL, SECOND |
| Fields inherited from class tigase.server.BasicComponent |
|---|
SCRIPTS_DIR_PROP_DEF, SCRIPTS_DIR_PROP_KEY, vHostManager |
| Fields inherited from interface tigase.disco.XMPPService |
|---|
CMD_FEATURES, DEF_FEATURES, INFO_XMLNS, ITEMS_XMLNS |
| Constructor Summary | |
|---|---|
StanzaReceiver()
Constructs ... |
|
| Method Summary | |
|---|---|
boolean |
addOutPacket(Packet packet)
Method description |
protected void |
addTaskInstance(ReceiverTaskIfc task)
Describe addTaskInstance method here. |
protected void |
addTaskInstance(java.lang.String task_type,
java.lang.String task_name,
java.util.Map<java.lang.String,java.lang.Object> task_params)
|
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)
Describe getDiscoInfo method here. |
java.util.List<tigase.xml.Element> |
getDiscoItems(java.lang.String node,
tigase.xmpp.JID jid,
tigase.xmpp.JID from)
Method description |
void |
getStatistics(StatisticsList list)
Method description |
ReceiverTaskIfc |
getTask(java.lang.String jidOrName)
Method description |
protected java.util.Map<java.lang.String,ReceiverTaskIfc> |
getTaskInstances()
|
protected java.util.Map<java.lang.String,TaskType> |
getTaskTypes()
|
boolean |
isAdmin(tigase.xmpp.JID jid)
Method description |
protected boolean |
isAllowedCreate(tigase.xmpp.JID jid,
java.lang.String task_type)
|
void |
processPacket(Packet packet)
Describe processPacket method here. |
protected void |
removeTaskInstance(ReceiverTaskIfc task)
|
protected void |
removeTaskSubscribers(ReceiverTaskIfc task,
tigase.xmpp.JID... subscr)
|
protected void |
saveTaskToRepository(ReceiverTaskIfc task)
|
void |
setProperties(java.util.Map<java.lang.String,java.lang.Object> props)
Describe setProperties method here. |
| Methods inherited from class tigase.server.AbstractMessageReceiver |
|---|
addOutPacketNB, addOutPackets, addOutPacketWithTimeout, addPacket, addPacketNB, addPackets, addRegexRouting, addTimerTask, addTimerTask, clearRegexRoutings, everyHour, everyMinute, everySecond, getMaxQueueSize, getRegexRoutings, hashCodeForPacket, isInRegexRoutings, newPacketId, processingThreads, processPacket, release, removeRegexRouting, setMaxQueueSize, setName, setParent, start, stop |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface tigase.server.ServerComponent |
|---|
getComponentId, getName, initializationCompleted, processPacket, release, setName |
| Methods inherited from interface tigase.server.sreceiver.StanzaReceiverIfc |
|---|
getDefHostName, getName |
| Methods inherited from interface tigase.server.MessageReceiver |
|---|
getDefHostName |
| Field Detail |
|---|
public static final java.lang.String MY_DOMAIN_NAME_PROP_KEY
public static final java.lang.String MY_DOMAIN_NAME_PROP_VAL
| Constructor Detail |
|---|
public StanzaReceiver()
| Method Detail |
|---|
public boolean addOutPacket(Packet packet)
addOutPacket in interface StanzaReceiverIfcaddOutPacket in class AbstractMessageReceiverpacket -
public java.util.Map<java.lang.String,java.lang.Object> getDefaults(java.util.Map<java.lang.String,java.lang.Object> params)
getDefaults in interface ConfigurablegetDefaults in class AbstractMessageReceiverparams -
public java.util.List<tigase.xml.Element> getDiscoFeatures(tigase.xmpp.JID from)
getDiscoFeatures in interface XMPPServicegetDiscoFeatures in class BasicComponentfrom -
public tigase.xml.Element getDiscoInfo(java.lang.String node,
tigase.xmpp.JID jid,
tigase.xmpp.JID from)
getDiscoInfo method here.
getDiscoInfo in interface XMPPServicegetDiscoInfo in class BasicComponentnode - a String valuejid - a String valuefrom -
Element value
public java.util.List<tigase.xml.Element> getDiscoItems(java.lang.String node,
tigase.xmpp.JID jid,
tigase.xmpp.JID from)
getDiscoItems in interface XMPPServicegetDiscoItems in class BasicComponentnode - jid - from -
public void getStatistics(StatisticsList list)
getStatistics in interface StatisticsContainergetStatistics in class AbstractMessageReceiverlist - public ReceiverTaskIfc getTask(java.lang.String jidOrName)
jidOrName -
public boolean isAdmin(tigase.xmpp.JID jid)
isAdmin in class BasicComponentjid -
public void processPacket(Packet packet)
processPacket method here.
processPacket in class AbstractMessageReceiverpacket - a Packet valuepublic void setProperties(java.util.Map<java.lang.String,java.lang.Object> props)
setProperties method here.
setProperties in interface ConfigurablesetProperties in class AbstractMessageReceiverprops - a Map value
protected void addTaskInstance(java.lang.String task_type,
java.lang.String task_name,
java.util.Map<java.lang.String,java.lang.Object> task_params)
throws tigase.util.TigaseStringprepException
tigase.util.TigaseStringprepExceptionprotected void addTaskInstance(ReceiverTaskIfc task)
addTaskInstance method here.
task - a ReceiverTaskIfc valueprotected java.util.Map<java.lang.String,ReceiverTaskIfc> getTaskInstances()
protected java.util.Map<java.lang.String,TaskType> getTaskTypes()
protected boolean isAllowedCreate(tigase.xmpp.JID jid,
java.lang.String task_type)
protected void removeTaskInstance(ReceiverTaskIfc task)
protected void removeTaskSubscribers(ReceiverTaskIfc task,
tigase.xmpp.JID... subscr)
protected void saveTaskToRepository(ReceiverTaskIfc task)
throws TigaseDBException
TigaseDBException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||