Class AbstractStrategy

  • All Implemented Interfaces:
    tigase.kernel.beans.Initializable, tigase.kernel.beans.UnregisterAware, StrategyIfc
    Direct Known Subclasses:
    ClusteredNodeStrategy, PartitionedStrategy

    public abstract class AbstractStrategy
    extends Object
    implements StrategyIfc, tigase.kernel.beans.Initializable, tigase.kernel.beans.UnregisterAware
    Author:
    andrzej
    • Field Detail

      • PUBSUB_PATH

        protected static final String[] PUBSUB_PATH
      • nodeConfigureElemNames

        protected final Set<String> nodeConfigureElemNames
      • cl_controller

        protected tigase.cluster.api.ClusterControllerIfc cl_controller
      • config

        @Inject
        protected tigase.pubsub.PubSubConfig config
      • eventBus

        @Inject
        protected tigase.eventbus.EventBus eventBus
      • localNodeJid

        protected tigase.xmpp.jid.JID localNodeJid
    • Constructor Detail

      • AbstractStrategy

        protected AbstractStrategy()
    • Method Detail

      • setLocalNodeJid

        protected void setLocalNodeJid​(tigase.xmpp.jid.JID jid)
      • getNodeForServiceJid

        public tigase.xmpp.jid.JID getNodeForServiceJid​(tigase.xmpp.jid.JID serviceJid)
      • nodeConnected

        public void nodeConnected​(tigase.xmpp.jid.JID jid)
        Specified by:
        nodeConnected in interface StrategyIfc
      • nodeDisconnected

        public void nodeDisconnected​(tigase.xmpp.jid.JID jid)
        Specified by:
        nodeDisconnected in interface StrategyIfc
      • setClusterController

        public void setClusterController​(tigase.cluster.api.ClusterControllerIfc cl_controller)
        Specified by:
        setClusterController in interface StrategyIfc
      • setConfig

        public void setConfig​(tigase.pubsub.PubSubConfig config)
        Specified by:
        setConfig in interface StrategyIfc
      • sendException

        public boolean sendException​(tigase.server.Packet packet,
                                     tigase.component.exceptions.ComponentException ex)
        Specified by:
        sendException in interface StrategyIfc
      • wrapNodeConfig

        public tigase.pubsub.AbstractNodeConfig wrapNodeConfig​(tigase.xmpp.jid.BareJID serviceJid,
                                                               String nodeName,
                                                               tigase.pubsub.AbstractNodeConfig config)
        Specified by:
        wrapNodeConfig in interface StrategyIfc
      • wrapNodeSubscriptions

        public tigase.pubsub.repository.cached.NodeSubscriptions wrapNodeSubscriptions​(tigase.pubsub.repository.NodeSubscriptions nodeSubscriptions)
        Specified by:
        wrapNodeSubscriptions in interface StrategyIfc
      • initialize

        public void initialize()
        Specified by:
        initialize in interface tigase.kernel.beans.Initializable
      • beforeUnregister

        public void beforeUnregister()
        Specified by:
        beforeUnregister in interface tigase.kernel.beans.UnregisterAware
      • getNodeForHashCode

        protected tigase.xmpp.jid.JID getNodeForHashCode​(int hashCode)
      • prepareCommandData

        protected Map<String,​String> prepareCommandData​(tigase.xmpp.jid.BareJID serviceJid,
                                                              String nodeName)
      • isNodeConfigure

        protected boolean isNodeConfigure​(tigase.xml.Element pubsubElem)
      • onItemPublishedEvent

        @Deprecated
        public void onItemPublishedEvent​(tigase.pubsub.modules.PublishItemModule.ItemPublishedEvent event)
        Deprecated.
      • onItemRetractedEvent

        @Deprecated
        public void onItemRetractedEvent​(tigase.pubsub.modules.RetractItemModule.ItemRetractedEvent event)
        Deprecated.