class LocalServerSession extends LocalSession implements ServerSession {

    /**
     * The method that was used to authenticate this session. Null when the session is not authenticated.
     */
    protected AuthenticationMethod authenticationMethod = null;

    public LocalServerSession(String serverName, Connection connection,
            StreamID streamID) {
        super(serverName, connection, streamID, Locale.getDefault());
    }

    @Override
    public void setDetached() {
        // TODO Implement stream management for s2s (OF-2425). Remove this override when it is.
        throw new UnsupportedOperationException("Stream management is not supported for server-to-server connections");
    }

    @Override
    public void reattach(LocalSession connectionProvider, long h) {
        // TODO Implement stream management for s2s (OF-2425). Remove this override when it is.
        throw new UnsupportedOperationException("Stream management is not supported for server-to-server connections");
    }

    /**
     * Returns the connection associated with this Session.
     *
     * @return The connection for this session
     */
    @Nonnull
    @Override
    public Connection getConnection() {<FILL_FUNCTION_BODY>}

    @Override
    public void setStatus(Status status) {
        super.setStatus(status);
        if (status != Status.AUTHENTICATED) {
            authenticationMethod = null;
        }
    }

    /**
     * Obtain method that was used to authenticate this session. Null when the session is not authenticated.
     *
     * @return the method used for authentication (possibly null).
     */
    @Override
    public AuthenticationMethod getAuthenticationMethod() {
        return authenticationMethod;
    }

    /**
     * Set the method that was used to authenticate this session. Setting a value will cause the status of this session
     * to be updated to 'Authenticated'.
     *
     * @param authenticationMethod The new authentication method for this session
     */
    public void setAuthenticationMethod(@Nonnull final AuthenticationMethod authenticationMethod) {
        this.authenticationMethod = authenticationMethod;
        setStatus(Status.AUTHENTICATED);
    }

    @Override
    public String toString()
    {
        return this.getClass().getSimpleName() +"{" +
            "address=" + address +
            ", streamID=" + streamID +
            ", status=" + status +
            ", isEncrypted=" + isEncrypted() +
            ", isDetached=" + isDetached() +
            ", authenticationMethod=" + authenticationMethod +
            '}';
    }
}

        final Connection connection = super.getConnection();
        // valid only as long as stream management for s2s is not implemented (OF-2425). Remove this override when it is.
        assert connection != null; // Openfire does not implement stream management for s2s (OF-2425). Therefor, the connection cannot be null.
        return connection;
    
<methods>public void <init>(java.lang.String, org.jivesoftware.openfire.Connection, org.jivesoftware.openfire.StreamID, java.util.Locale) ,public void close() ,public void deliverRawText(java.lang.String) ,public JID getAddress() ,public abstract List<Element> getAvailableStreamFeatures() ,public java.lang.String getCipherSuiteName() ,public org.jivesoftware.openfire.Connection getConnection() ,public java.util.Date getCreationDate() ,public java.lang.String getHostAddress() throws java.net.UnknownHostException,public java.lang.String getHostName() throws java.net.UnknownHostException,public final java.util.Locale getLanguage() ,public java.util.Date getLastActiveDate() ,public long getNumClientPackets() ,public long getNumServerPackets() ,public java.security.cert.Certificate[] getPeerCertificates() ,public java.lang.String getServerName() ,public java.lang.Object getSessionData(java.lang.String) ,public Map<java.lang.String,java.lang.String> getSoftwareVersion() ,public org.jivesoftware.openfire.session.Session.Status getStatus() ,public org.jivesoftware.openfire.StreamID getStreamID() ,public org.jivesoftware.openfire.streammanagement.StreamManager getStreamManager() ,public java.lang.String getTLSProtocolName() ,public void incrementClientPacketCount() ,public void incrementServerPacketCount() ,public boolean isClosed() ,public boolean isDetached() ,public boolean isEncrypted() ,public boolean isSecure() ,public boolean isUsingSelfSignedCertificate() ,public void process(Packet) ,public void reattach(org.jivesoftware.openfire.session.LocalSession, long) ,public java.lang.Object removeSessionData(java.lang.String) ,public void setAddress(JID) ,public void setDetached() ,public java.lang.Object setSessionData(java.lang.String, java.lang.Object) ,public void setSoftwareVersionData(java.lang.String, java.lang.String) ,public void setStatus(org.jivesoftware.openfire.session.Session.Status) ,public java.lang.String toString() ,public boolean validate() <variables>private static final Logger Log,protected JID address,private java.util.concurrent.atomic.AtomicLong clientPacketCount,protected org.jivesoftware.openfire.Connection conn,private final non-sealed java.util.Locale language,private long lastActiveDate,private final java.util.concurrent.locks.Lock lock,protected final non-sealed java.lang.String serverName,private java.util.concurrent.atomic.AtomicLong serverPacketCount,private final Map<java.lang.String,java.lang.Object> sessionData,protected org.jivesoftware.openfire.SessionManager sessionManager,private Map<java.lang.String,java.lang.String> softwareVersionData,protected final long startDate,protected org.jivesoftware.openfire.session.Session.Status status,protected final non-sealed org.jivesoftware.openfire.StreamID streamID,protected final non-sealed org.jivesoftware.openfire.streammanagement.StreamManager streamManager