<commit_before>package org.cometd.bayeux.server;

import java.net.InetSocketAddress;

import org.cometd.bayeux.Transport;

/**
 * <p>Server side extension of a Bayeux transport.</p>
 * <p>A {@link ServerTransport} can be configured with a {@link #getTimeout() timeout}
 * (that in the default long polling http transport is the period of time
 * the server waits before answering to a long poll), an {@link #getInterval() interval}
 * (that in the default long polling http transport is the period of time
 * that the client waits between long polls), a {@link #getMaxInterval() maximum interval}
 * (that in the default long polling http transport is the period of time
 * that must elapse before the server consider the client being lost).</p>
 * <p>Further configuration include the {@link #getMaxLazyTimeout() maximum lazy timeout}
 * used for {@link ServerMessage#isLazy() lazy messages} and the style of delivery,
 * that may happen during both responses to requests and via the "/meta/connect" channel,
 * or via the "/meta/connect" channel {@link #isMetaConnectDeliveryOnly() exclusively}.
 *
 * @version $Revision: 1483 $ $Date: 2009-03-04 14:56:47 +0100 (Wed, 04 Mar 2009) $
 */
public interface ServerTransport extends Transport
{
    /**
     * <p>The advice that this transport sends to inform the client
     * about transport (re)connection.</p>
     * @return the advice object sent by the server transport
     */
    public Object getAdvice();

    /**
     * @return the timeout (in milliseconds) of this transport
     */
    public long getTimeout();

    /**
     * @return the interval of time (in milliseconds) of this transport
     */
    public long getInterval();

    /**
     * @return the maximum interval of time (in milliseconds) before the server consider the client lost
     */
    public long getMaxInterval();

    /**
     * @return the maximum time (in milliseconds) before dispatching lazy messages
     */
    public long getMaxLazyTimeout();

    /**
     * @return whether the messages are delivered to clients exclusively via the "/meta/connect" channel
     */
    public boolean isMetaConnectDeliveryOnly();

    /**
     * @return the remote socket address
     * @deprecated use {@link #getContext()} and {@link BayeuxContext#getRemoteAddress()}
     */
    public InetSocketAddress getCurrentRemoteAddress();

    /**
     * @return the local socket address
     * @deprecated use {@link #getContext()} and {@link BayeuxContext#getLocalAddress()}
     */
    public InetSocketAddress getCurrentLocalAddress();
    
    /**
     * @return The current transport context or null if no current context<commit_msg>Added @Deprecated annotations to deprecated methods.<commit_after>package org.cometd.bayeux.server;

import java.net.InetSocketAddress;

import org.cometd.bayeux.Transport;

/**
 * <p>Server side extension of a Bayeux transport.</p>
 * <p>A {@link ServerTransport} can be configured with a {@link #getTimeout() timeout}
 * (that in the default long polling http transport is the period of time
 * the server waits before answering to a long poll), an {@link #getInterval() interval}
 * (that in the default long polling http transport is the period of time
 * that the client waits between long polls), a {@link #getMaxInterval() maximum interval}
 * (that in the default long polling http transport is the period of time
 * that must elapse before the server consider the client being lost).</p>
 * <p>Further configuration include the {@link #getMaxLazyTimeout() maximum lazy timeout}
 * used for {@link ServerMessage#isLazy() lazy messages} and the style of delivery,
 * that may happen during both responses to requests and via the "/meta/connect" channel,
 * or via the "/meta/connect" channel {@link #isMetaConnectDeliveryOnly() exclusively}.
 *
 * @version $Revision: 1483 $ $Date: 2009-03-04 14:56:47 +0100 (Wed, 04 Mar 2009) $
 */
public interface ServerTransport extends Transport
{
    /**
     * <p>The advice that this transport sends to inform the client
     * about transport (re)connection.</p>
     * @return the advice object sent by the server transport
     */
    public Object getAdvice();

    /**
     * @return the timeout (in milliseconds) of this transport
     */
    public long getTimeout();

    /**
     * @return the interval of time (in milliseconds) of this transport
     */
    public long getInterval();

    /**
     * @return the maximum interval of time (in milliseconds) before the server consider the client lost
     */
    public long getMaxInterval();

    /**
     * @return the maximum time (in milliseconds) before dispatching lazy messages
     */
    public long getMaxLazyTimeout();

    /**
     * @return whether the messages are delivered to clients exclusively via the "/meta/connect" channel
     */
    public boolean isMetaConnectDeliveryOnly();

    /**
     * @return the remote socket address
     * @deprecated use {@link #getContext()} and {@link BayeuxContext#getRemoteAddress()}
     */
    @Deprecated
    public InetSocketAddress getCurrentRemoteAddress();

    /**
     * @return the local socket address
     * @deprecated use {@link #getContext()} and {@link BayeuxContext#getLocalAddress()}
     */
    @Deprecated
    public InetSocketAddress getCurrentLocalAddress();

    /**
     * @return The current transport context or null if no current context
{'fraction_non_alphanumeric': 0.0958217270194986, 'fraction_numerical': 0.010399257195914578, 'mean_word_length': 3.5451476793248946, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '833605', 'n_tokens_mistral': 1445, 'n_tokens_neox': 1368, 'n_words': 592}