All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.directwebremoting.impl.DefaultServerLoadMonitor Maven / Gradle / Ivy

Go to download

DWR is easy Ajax for Java. It makes it simple to call Java code directly from Javascript. It gets rid of almost all the boilerplate code between the web browser and your Java code. This version 4.0.2 works with Jakarta Servlet 4.0.2.

The newest version!
package org.directwebremoting.impl;

public class DefaultServerLoadMonitor extends AbstractServerLoadMonitor
{

    public boolean supportsStreaming()
    {
        return true;
    }

    public long getConnectedTime()
    {
        return connectedTime;
    }

    public int getDisconnectedTime()
    {
        return disconnectedTime;
    }

    /**
     * Setter to allow configuration from the container (f ex init-param)
     * @param connectedTime ...
     */
    public void setConnectedTime(long connectedTime)
    {
        this.connectedTime = connectedTime;
    }

    /**
     * Setter to allow configuration from the container (f ex init-param)
     * @param disconnectedTime ...
     */
    public void setDisconnectedTime(int disconnectedTime)
    {
        this.disconnectedTime = disconnectedTime;
    }

    /**
     * The time we are currently waiting before sending a browser away and
     * asking it to reconnect.
     */
    protected long connectedTime = 60000;

    /**
     * How long are we telling users to wait before they come back next
     */
    protected int disconnectedTime = 0;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy