public class ShortNewsPublisher extends RepoRosterTask
NewsDistributor
tasks
but it also writes all messages content to a table in database.
Web application can then read content from this table and publish it
on the Web site.
Format of the table is as follows (schema definition in MySQL script):
create table short_news ( -- Automatic record ID snid bigint unsigned NOT NULL auto_increment, -- Automaticly generated timestamp and automaticly updated on change publishing_time timestamp, -- Optional news type: 'shorts', 'minis', 'techs', 'funs'.... news_type varchar(10), -- Author JID author varchar(128) NOT NULL, -- Short subject - this is short news, right? subject varchar(128) NOT NULL, -- Short news message - this is short news, right? body varchar(1024) NOT NULL, primary key(snid), key publishing_date (publishing_date), key author (author) ) default character set utf8;Created: Sat May 26 10:25:42 2007
Constructor and Description |
---|
ShortNewsPublisher() |
Modifier and Type | Method and Description |
---|---|
void |
destroy(Queue<Packet> results)
Method description
|
Map<String,PropertyItem> |
getDefaultParams()
Method description
|
String |
getHelp()
Method description
|
String |
getType()
Method description
|
protected void |
processMessage(Packet packet,
Queue<Packet> results)
Method description
|
void |
setParams(Map<String,Object> map)
Method description
|
addToRoster, loadRoster, removeFromRoster, setRosterItemAdmin, setRosterItemModerationAccepted, setRosterItemOwner, setRosterItemSubscribed
addNewSubscribers, addOutPacket, addToRoster, getDescription, getInstance, getJID, getParams, getRoster, getRosterItem, getStatistics, getStats, init, isAdmin, isAllowedToPost, isAllowedToSubscribe, processPacket, removeSubscribers, setJID, setRosterItemOnline, setStanzaReceiver
public void destroy(Queue<Packet> results)
destroy
in interface ReceiverTaskIfc
destroy
in class RepoRosterTask
results
- public Map<String,PropertyItem> getDefaultParams()
getDefaultParams
in interface ReceiverTaskIfc
getDefaultParams
in class AbstractReceiverTask
Map
value with task instance configuration parameters.ReceiverTaskIfc.setParams(Map)
public String getHelp()
String
value of task class help information.public String getType()
String
value of the task name.public void setParams(Map<String,Object> map)
setParams
in interface ReceiverTaskIfc
setParams
in class RepoRosterTask
map
- protected void processMessage(Packet packet, Queue<Packet> results)
AbstractReceiverTask
processMessage
in class AbstractReceiverTask
Copyright © 2018 "Tigase, Inc.". All rights reserved.