Package tigase.server.xmppserver

## Interface S2SConnectionHandlerIfc<IO extends XMPPIOService<?>>

- All Known Implementing Classes:
    `S2SConnectionManager`

      public interface S2SConnectionHandlerIfc<IO extends XMPPIOService<?>>

  Created: Dec 9, 2010 11:40:28 PM
  Author:
    Artur Hefczyc

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `addOutPacket​(Packet packet)` |
    `void` | `addTimerTask​(TimerTask task, long delay, java.util.concurrent.TimeUnit unit)` |
    `CIDConnections` | `getCIDConnections​(CID cid, boolean createNew)` |
    `CIDConnections.CIDConnectionsOpenerService` | `getConnectionOpenerService()` |
    `BareJID` | `getDefHostName()` |
    `java.lang.String` | `getSecretForDomain​(java.lang.String domain)` | Returns secret used for particular domain
    `java.lang.String` | `getServerNameForDomain​(java.lang.String domain)` |
    `java.util.List<Element>` | `getStreamFeatures​(S2SIOService serv)` | Returns stream features available for particular S2S connection.
    `void` | `initNewConnection​(java.util.Map<java.lang.String,​java.lang.Object> port_props)` |
    `boolean` | `isTlsNeedClientAuthEnabled()` |
    `boolean` | `isTlsRequired​(java.lang.String domain)` | Checks if TLS is required for particular domain
    `boolean` | `isTlsWantClientAuthEnabled()` |
    `boolean` | `sendVerifyResult​(java.lang.String elem_name, CID connCid, CID keyCid, java.lang.Boolean valid, java.lang.String key_sessionId, java.lang.String serv_sessionId, java.lang.String cdata, boolean handshakingOnly)` |
    `boolean` | `sendVerifyResult​(java.lang.String elem_name, CID connCid, CID keyCid, java.lang.Boolean valid, java.lang.String key_sessionId, java.lang.String serv_sessionId, java.lang.String cdata, boolean handshakingOnly, Element errorElem)` |
    `void` | `serviceConnected​(IO service)` |
    `void` | `writePacketsToSocket​(IO serv, java.util.Queue<Packet> packets)` |
    `boolean` | `writePacketToSocket​(IO serv, Packet packet)` |
    `void` | `writeRawData​(IO serv, java.lang.String strError)` |

- - ### Method Detail

    - #### getStreamFeatures

          java.util.List<Element> getStreamFeatures​(S2SIOService serv)

      Returns stream features available for particular S2S connection.
      Parameters:
        `serv` - `S2SIOService` for which stream features should be retrieved
      Returns:
        list of stream features

    - #### addOutPacket

          boolean addOutPacket​(Packet packet)

    - #### addTimerTask

          void addTimerTask​(TimerTask task,
                            long delay,
                            java.util.concurrent.TimeUnit unit)

    - #### getCIDConnections

          CIDConnections getCIDConnections​(CID cid,
                                           boolean createNew)
                                    throws NotLocalhostException,
                                           LocalhostException

      Throws:
        `NotLocalhostException`
        `LocalhostException`

    - #### getConnectionOpenerService

          CIDConnections.CIDConnectionsOpenerService getConnectionOpenerService()

    - #### getDefHostName

          BareJID getDefHostName()

    - #### getSecretForDomain

          java.lang.String getSecretForDomain​(java.lang.String domain)
                                       throws NotLocalhostException

      Returns secret used for particular domain
      Parameters:
        `domain` - for which secret should be returned
      Returns:
        for particular domain
      Throws:
        `NotLocalhostException` - if the domain is not local

    - #### getServerNameForDomain

          java.lang.String getServerNameForDomain​(java.lang.String domain)

    - #### initNewConnection

          void initNewConnection​(java.util.Map<java.lang.String,​java.lang.Object> port_props)

    - #### isTlsRequired

          boolean isTlsRequired​(java.lang.String domain)

      Checks if TLS is required for particular domain
      Parameters:
        `domain` - for which secret should be returned
      Returns:
        boolean indicating whether TLS is required

    - #### isTlsWantClientAuthEnabled

          boolean isTlsWantClientAuthEnabled()

    - #### isTlsNeedClientAuthEnabled

          boolean isTlsNeedClientAuthEnabled()

    - #### sendVerifyResult

          boolean sendVerifyResult​(java.lang.String elem_name,
                                   CID connCid,
                                   CID keyCid,
                                   java.lang.Boolean valid,
                                   java.lang.String key_sessionId,
                                   java.lang.String serv_sessionId,
                                   java.lang.String cdata,
                                   boolean handshakingOnly)

    - #### sendVerifyResult

          boolean sendVerifyResult​(java.lang.String elem_name,
                                   CID connCid,
                                   CID keyCid,
                                   java.lang.Boolean valid,
                                   java.lang.String key_sessionId,
                                   java.lang.String serv_sessionId,
                                   java.lang.String cdata,
                                   boolean handshakingOnly,
                                   Element errorElem)

    - #### serviceConnected

          void serviceConnected​(IO service)

    - #### writePacketToSocket

          boolean writePacketToSocket​(IO serv,
                                      Packet packet)

    - #### writePacketsToSocket

          void writePacketsToSocket​(IO serv,
                                    java.util.Queue<Packet> packets)

    - #### writeRawData

          void writeRawData​(IO serv,
                            java.lang.String strError)