tigase.server.sreceiver

## Class AbstractReceiverTask

- java.lang.Object
- - tigase.server.sreceiver.AbstractReceiverTask

- All Implemented Interfaces:
    ReceiverTaskIfc
  Direct Known Subclasses:
    RepoRosterTask, TesterTask

      public abstract class AbstractReceiverTask
      extends Object
      implements ReceiverTaskIfc

  Describe class AbstractReceiverTask here. Created: Fri May 11 08:34:04 2007
  Version:
    $Rev$
  Author:
    Artur Hefczyc

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractReceiverTask()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addNewSubscribers(Queue<Packet> results, tigase.xmpp.JID... new_subscr)` Describe `addNewSubscribers` method here.
    `protected boolean` | `addOutPacket(Packet packet)` Method description
    `RosterItem` | `addToRoster(tigase.xmpp.JID jid)` Method description
    `void` | `addToRoster(RosterItem ri)` Method description
    `void` | `destroy(Queue<Packet> results)` Method description
    `Map<String,PropertyItem>` | `getDefaultParams()` Method description
    `String` | `getDescription()` Describe `getDescription` method here.
    `ReceiverTaskIfc` | `getInstance()` Describe `getInstance` method here.
    `tigase.xmpp.JID` | `getJID()` Describe `getJID` method here.
    `Map<String,PropertyItem>` | `getParams()` Describe `getParams` method here.
    `Map<tigase.xmpp.JID,RosterItem>` | `getRoster()` Method description
    `RosterItem` | `getRosterItem(tigase.xmpp.JID jid)` Method description
    `void` | `getStatistics(StatisticsList list)` Method description
    `List<StatRecord>` | `getStats()` Method description
    `void` | `init(Queue<Packet> results)` Method description
    `boolean` | `isAdmin(tigase.xmpp.JID jid)` Method description
    `boolean` | `isAllowedToPost(tigase.xmpp.JID buddy)` Method description
    `boolean` | `isAllowedToSubscribe(tigase.xmpp.JID buddy)` Method description
    `protected void` | `processMessage(Packet packet, Queue<Packet> results)` Method description
    `void` | `processPacket(Packet packet, Queue<Packet> results)` Describe `processPacket` method here.
    `RosterItem` | `removeFromRoster(tigase.xmpp.JID jid)` Method description
    `void` | `removeSubscribers(Queue<Packet> results, tigase.xmpp.JID... subscr)` Method description
    `void` | `setJID(tigase.xmpp.JID jid)` Describe `setJID` method here.
    `void` | `setParams(Map<String,Object> map)` Describe `setParams` method here.
    `void` | `setRosterItemAdmin(RosterItem ri, boolean admin)` Method description
    `void` | `setRosterItemModerationAccepted(RosterItem ri, boolean accepted)` Method description
    `void` | `setRosterItemOnline(RosterItem ri, boolean online)` Method description
    `void` | `setRosterItemOwner(RosterItem ri, boolean owner)` Method description
    `void` | `setRosterItemSubscribed(RosterItem ri, boolean subscribed)` Method description
    `void` | `setStanzaReceiver(StanzaReceiverIfc srecv)` Method description

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface tigase.server.sreceiver.ReceiverTaskIfc

      `getHelp, getType`

- - ### Constructor Detail

    - #### AbstractReceiverTask

          public AbstractReceiverTask()

  - ### Method Detail

    - #### addNewSubscribers

          public void addNewSubscribers(Queue<Packet> results,
                               tigase.xmpp.JID... new_subscr)

      Describe `addNewSubscribers` method here.
      Parameters:
        `results` -
        `new_subscr` - a `String[]` value

    - #### addToRoster

          public void addToRoster(RosterItem ri)

      Method description
      Parameters:
        `ri` -

    - #### addToRoster

          public RosterItem addToRoster(tigase.xmpp.JID jid)

      Method description
      Parameters:
        `jid` -

    - #### destroy

          public void destroy(Queue<Packet> results)

      Method description
      Specified by:
        `destroy` in interface `ReceiverTaskIfc`
      Parameters:
        `results` -

    - #### getDefaultParams

          public Map<String,PropertyItem> getDefaultParams()

      Method description
      Specified by:
        `getDefaultParams` in interface `ReceiverTaskIfc`
      Returns:
        a `Map` value with task instance configuration parameters.
      See Also:
        `ReceiverTaskIfc.setParams(Map)`

    - #### getDescription

          public String getDescription()

      Describe `getDescription` method here.
      Specified by:
        `getDescription` in interface `ReceiverTaskIfc`
      Returns:
        a `String` value

    - #### getInstance

          public ReceiverTaskIfc getInstance()

      Describe `getInstance` method here.
      Specified by:
        `getInstance` in interface `ReceiverTaskIfc`
      Returns:
        a `ReceiverTaskIfc` value

    - #### getJID

          public tigase.xmpp.JID getJID()

      Describe `getJID` method here.
      Specified by:
        `getJID` in interface `ReceiverTaskIfc`
      Returns:
        a `String` value
      See Also:
        `ReceiverTaskIfc.setJID(tigase.xmpp.JID)`

    - #### getParams

          public Map<String,PropertyItem> getParams()

      Describe `getParams` method here.
      Specified by:
        `getParams` in interface `ReceiverTaskIfc`
      Returns:
        a `Map` value
      See Also:
        `ReceiverTaskIfc.setParams(Map)`

    - #### getRoster

          public Map<tigase.xmpp.JID,RosterItem> getRoster()

      Method description
      Specified by:
        `getRoster` in interface `ReceiverTaskIfc`
      Returns:
        a `Map` value with all user subscribed to this task.

    - #### getRosterItem

          public RosterItem getRosterItem(tigase.xmpp.JID jid)

      Method description
      Parameters:
        `jid` -

    - #### getStatistics

          public void getStatistics(StatisticsList list)

      Method description
      Specified by:
        `getStatistics` in interface `ReceiverTaskIfc`
      Parameters:
        `list` -

    - #### getStats

          public List<StatRecord> getStats()

      Method description
      Specified by:
        `getStats` in interface `ReceiverTaskIfc`
      Returns:
        a `List` of statistics records.
      See Also:
        `StatRecord`

    - #### init

          public void init(Queue<Packet> results)

      Method description
      Specified by:
        `init` in interface `ReceiverTaskIfc`
      Parameters:
        `results` -

    - #### isAdmin

          public boolean isAdmin(tigase.xmpp.JID jid)

      Method description
      Specified by:
        `isAdmin` in interface `ReceiverTaskIfc`
      Parameters:
        `jid` -
      Returns:
        a `boolean` value true if given user is either task admin or task owner.

    - #### isAllowedToPost

          public boolean isAllowedToPost(tigase.xmpp.JID buddy)

      Method description
      Parameters:
        `buddy` -

    - #### isAllowedToSubscribe

          public boolean isAllowedToSubscribe(tigase.xmpp.JID buddy)

      Method description
      Parameters:
        `buddy` -

    - #### processPacket

          public void processPacket(Packet packet,
                           Queue<Packet> results)

      Describe `processPacket` method here.
      Specified by:
        `processPacket` in interface `ReceiverTaskIfc`
      Parameters:
        `packet` - a `Packet` value
        `results` - a `Queue` value

    - #### removeFromRoster

          public RosterItem removeFromRoster(tigase.xmpp.JID jid)

      Method description
      Parameters:
        `jid` -

    - #### removeSubscribers

          public void removeSubscribers(Queue<Packet> results,
                               tigase.xmpp.JID... subscr)

      Method description
      Specified by:
        `removeSubscribers` in interface `ReceiverTaskIfc`
      Parameters:
        `results` -
        `subscr` -

    - #### setJID

          public void setJID(tigase.xmpp.JID jid)

      Describe `setJID` method here.
      Specified by:
        `setJID` in interface `ReceiverTaskIfc`
      Parameters:
        `jid` - a `String` value

    - #### setParams

          public void setParams(Map<String,Object> map)

      Describe `setParams` method here.
      Specified by:
        `setParams` in interface `ReceiverTaskIfc`
      Parameters:
        `map` - a `Map` value

    - #### setRosterItemAdmin

          public void setRosterItemAdmin(RosterItem ri,
                                boolean admin)

      Method description
      Parameters:
        `ri` -
        `admin` -

    - #### setRosterItemModerationAccepted

          public void setRosterItemModerationAccepted(RosterItem ri,
                                             boolean accepted)

      Method description
      Specified by:
        `setRosterItemModerationAccepted` in interface `ReceiverTaskIfc`
      Parameters:
        `ri` -
        `accepted` -

    - #### setRosterItemOnline

          public void setRosterItemOnline(RosterItem ri,
                                 boolean online)

      Method description
      Parameters:
        `ri` -
        `online` -

    - #### setRosterItemOwner

          public void setRosterItemOwner(RosterItem ri,
                                boolean owner)

      Method description
      Parameters:
        `ri` -
        `owner` -

    - #### setRosterItemSubscribed

          public void setRosterItemSubscribed(RosterItem ri,
                                     boolean subscribed)

      Method description
      Parameters:
        `ri` -
        `subscribed` -

    - #### setStanzaReceiver

          public void setStanzaReceiver(StanzaReceiverIfc srecv)

      Method description
      Specified by:
        `setStanzaReceiver` in interface `ReceiverTaskIfc`
      Parameters:
        `srecv` -

    - #### addOutPacket

          protected boolean addOutPacket(Packet packet)

      Method description
      Parameters:
        `packet` -

    - #### processMessage

          protected void processMessage(Packet packet,
                            Queue<Packet> results)

      Method description
      Parameters:
        `packet` -
        `results` -

Copyright © 2013 Tigase. All rights reserved.