Package tigase.server.xmppserver.proc

# Class Dialback

java.lang.Object
tigase.server.xmppserver.proc.S2SAbstract
tigase.server.xmppserver.proc.S2SAbstractProcessor
tigase.server.xmppserver.proc.AuthenticationProcessor
tigase.server.xmppserver.proc.Dialback

All Implemented Interfaces:
  `Comparable<S2SProcessor>`, `S2SProcessor`, `StatisticsProviderIfc`

@Bean(name="dialback", parent=S2SConnectionManager.class, active=true) public class Dialback extends AuthenticationProcessor
Created: Dec 9, 2010 2:00:52 PM

Author:
  Artur Hefczyc

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class tigase.server.xmppserver.proc.S2SAbstractProcessor

  `S2SAbstractProcessor.Order`

- ## Field Summary

  ### Fields inherited from class tigase.server.xmppserver.proc.AuthenticationProcessor

  `authenticatorSelectorManager`

  ### Fields inherited from class tigase.server.xmppserver.proc.S2SAbstractProcessor

  `processorsComparator`

  ### Fields inherited from class tigase.server.xmppserver.proc.S2SAbstract

  `DB_RESULT_EL_NAME, DB_VERIFY_EL_NAME, DIALBACK_EL, DIALBACK_NS, FEATURES_DIALBACK_PATH, FEATURES_EL, FEATURES_NS, FEATURES_STARTTLS_PATH, FORCE_VERSION, handler, PROCEED_TLS_EL, RESULT_EL_NAME, START_TLS_EL, START_TLS_NS, STREAM_FEATURES_EL, VERIFY_EL_NAME, VERSION_ATT_NAME, XMLNS_CLIENT_VAL, XMLNS_DB_ATT, XMLNS_DB_VAL`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Dialback()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `canHandle(Packet p, S2SIOService serv, Queue<Packet> results)`
  `String`
  `getMethodName()`
  `void`
  `getStatistics(String compName, StatisticsList list)`
  `protected void`
  `initDialback(S2SIOService serv, String remote_id)`
  `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`
  `restartAuth(Packet packet, S2SIOService serv, Queue<Packet> results)`
  `boolean`
  `shouldSkipUndelivered(Packet packet)`
  Method determines whether not delivered packet (due to closed connection) should be skipped and not added for re-delivery.
  `void`
  `streamFeatures(S2SIOService serv, List<Element> results)`
  `String`
  `streamOpened(S2SIOService serv, Map<String,String> attribs)`
  `protected boolean`
  `wasResultRequested(S2SIOService serv, String domain)`
  Checks if result request for received domain was sent by service
  `protected boolean`
  `wasVerifyRequested(S2SIOService serv, String domain)`
  Checks if verify request for received domain was sent by service

  ### Methods inherited from class tigase.server.xmppserver.proc.AuthenticationProcessor

  `serviceStarted`

  ### Methods inherited from class tigase.server.xmppserver.proc.S2SAbstractProcessor

  `compareTo, serviceStopped, setSkipTlsHosts, skipTLSForHost, streamClosed`

  ### Methods inherited from class tigase.server.xmppserver.proc.S2SAbstract

  `generateStreamError, generateStreamError, init`

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

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

  ### Methods inherited from interface tigase.server.xmppserver.S2SProcessor

  `init, stopProcessing`

- ## Constructor Details

  - ### Dialback

    public Dialback()

- ## Method Details

  - ### getMethodName

    public String getMethodName()

  - ### order

    public int order()
    Description copied from interface: `S2SProcessor`
    Returns order of processor which is used to set order in which processors will be processing packet

  - ### process

    public boolean process(Packet p, S2SIOService serv, Queue<Packet> results)
    Specified by:
      `process` in interface `S2SProcessor`
    Overrides:
      `process` in class `S2SAbstractProcessor`

  - ### streamFeatures

    public void streamFeatures(S2SIOService serv, List<Element> results)
    Specified by:
      `streamFeatures` in interface `S2SProcessor`
    Overrides:
      `streamFeatures` in class `S2SAbstractProcessor`

  - ### streamOpened

    public String streamOpened(S2SIOService serv, Map<String,String> attribs)
    Specified by:
      `streamOpened` in interface `S2SProcessor`
    Overrides:
      `streamOpened` in class `S2SAbstractProcessor`

  - ### restartAuth

    public void restartAuth(Packet packet, S2SIOService serv, Queue<Packet> results)

  - ### canHandle

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

  - ### getStatistics

    public void getStatistics(String compName, StatisticsList list)
    Specified by:
      `getStatistics` in interface `StatisticsProviderIfc`
    Overrides:
      `getStatistics` in class `S2SAbstractProcessor`

  - ### wasResultRequested

    protected boolean wasResultRequested(S2SIOService serv, String domain)
    Checks if result request for received domain was sent by service

  - ### wasVerifyRequested

    protected boolean wasVerifyRequested(S2SIOService serv, String domain)
    Checks if verify request for received domain was sent by service
    See Also:
      - `CIDConnections.sendHandshakingOnly(tigase.server.Packet)`

  - ### initDialback

    protected void initDialback(S2SIOService serv, String remote_id)

  - ### shouldSkipUndelivered

    public boolean shouldSkipUndelivered(Packet packet)
    Description copied from interface: `S2SProcessor`
    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.