|
||||||||||
| 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 sibling to StanzaSender class and offers just an
opposite functionality. 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 usual 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.subscribe 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 String |
MY_DOMAIN_NAME_PROP_KEY
Field description |
static 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, maxInQueueSize, maxOutQueueSize, MINUTE, OUTGOING_FILTERS_PROP_KEY, OUTGOING_FILTERS_PROP_VAL, SECOND |
| Fields inherited from class tigase.server.BasicComponent |
|---|
ALL_PROP_KEY, COMMAND_PROP_NODE, scriptCommands, 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(String task_type,
String task_name,
Map<String,Object> task_params)
|
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)
Describe getDiscoInfo method here. |
List<tigase.xml.Element> |
getDiscoItems(String node,
tigase.xmpp.JID jid,
tigase.xmpp.JID from)
Method description |
void |
getStatistics(StatisticsList list)
Method description |
ReceiverTaskIfc |
getTask(String jidOrName)
Method description |
protected Map<String,ReceiverTaskIfc> |
getTaskInstances()
|
protected Map<String,TaskType> |
getTaskTypes()
|
boolean |
isAdmin(tigase.xmpp.JID jid)
Method description |
protected boolean |
isAllowedCreate(tigase.xmpp.JID jid,
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(Map<String,Object> props)
Describe setProperties method here. |
| 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 String MY_DOMAIN_NAME_PROP_KEY
public static final 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 Map<String,Object> getDefaults(Map<String,Object> params)
getDefaults in interface ConfigurablegetDefaults in class AbstractMessageReceiverparams -
public List<tigase.xml.Element> getDiscoFeatures(tigase.xmpp.JID from)
getDiscoFeatures in interface XMPPServicegetDiscoFeatures in class BasicComponentfrom -
public tigase.xml.Element getDiscoInfo(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 List<tigase.xml.Element> getDiscoItems(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(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(Map<String,Object> props)
setProperties method here.
setProperties in interface ConfigurablesetProperties in class AbstractMessageReceiverprops - a Map value
protected void addTaskInstance(String task_type,
String task_name,
Map<String,Object> task_params)
throws tigase.util.TigaseStringprepException
tigase.util.TigaseStringprepExceptionprotected void addTaskInstance(ReceiverTaskIfc task)
addTaskInstance method here.
task - a ReceiverTaskIfc valueprotected Map<String,ReceiverTaskIfc> getTaskInstances()
protected Map<String,TaskType> getTaskTypes()
protected boolean isAllowedCreate(tigase.xmpp.JID jid,
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 | |||||||||