Package tigase.server.xmppserver

# Interface S2SProcessor

All Superinterfaces:
  `Comparable<S2SProcessor>`, `StatisticsProviderIfc`

All Known Implementing Classes:
  `AuthenticationProcessor`, `Dialback`, `S2SAbstractProcessor`, `SaslExternal`, `StartTLS`, `StartZlib`, `StreamError`, `StreamFeatures`, `StreamOpen`

public interface S2SProcessor extends Comparable<S2SProcessor>, StatisticsProviderIfc
Created: Dec 9, 2010 1:50:09 PM

Author:
  Artur Hefczyc

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `init(S2SConnectionHandlerIfc<S2SIOService> handler, Map<String,Object> props)`
  `int`
  `order()`
  Returns order of processor which is used to set order in which processors will be processing packet
  `boolean`
  `process(Packet p, S2SIOService serv, Queue<Packet> results)`
  `void`
  `serviceStarted(S2SIOService serv)`
  `void`
  `serviceStopped(S2SIOService serv)`
  `default boolean`
  `shouldSkipUndelivered(Packet packet)`
  Method determines whether not delivered packet (due to closed connection) should be skipped and not added for re-delivery.
  `default boolean`
  `stopProcessing()`
  `void`
  `streamClosed(S2SIOService serv)`
  `void`
  `streamFeatures(S2SIOService serv, List<Element> results)`
  `String`
  `streamOpened(S2SIOService serv, Map<String,String> attribs)`

  ### Methods inherited from interface java.lang.Comparable

  `compareTo`

  ### Methods inherited from interface tigase.stats.StatisticsProviderIfc

  `getStatistics`

- ## Method Details

  - ### order

    int order()
    Returns order of processor which is used to set order in which processors will be processing packet

  - ### serviceStarted

    void serviceStarted(S2SIOService serv)

  - ### serviceStopped

    void serviceStopped(S2SIOService serv)

  - ### streamFeatures

    void streamFeatures(S2SIOService serv, List<Element> results)

  - ### init

    void init(S2SConnectionHandlerIfc<S2SIOService> handler, Map<String,Object> props)

  - ### process

    boolean process(Packet p, S2SIOService serv, Queue<Packet> results)

  - ### stopProcessing

    default boolean stopProcessing()

  - ### streamClosed

    void streamClosed(S2SIOService serv)

  - ### streamOpened

    String streamOpened(S2SIOService serv, Map<String,String> attribs)

  - ### shouldSkipUndelivered

    default boolean shouldSkipUndelivered(Packet packet)
    Method determines whether not delivered packet (due to closed connection) should be skipped and not added for re-delivery. We should not re-add certain packets such as stream features or SASL as those are related to particular connection and if it got broken then there's no point in trying to re-deliver them.
    Parameters:
      `packet` - which was not delivered and is to be re-delivered
    Returns:
      `true` if the packet should be skipped/ignored or `false` if it is to be re-delivered.