GithubHelp home page GithubHelp logo

Comments (2)

GoogleCodeExporter avatar GoogleCodeExporter commented on June 2, 2024
Implementation in Channel.java:


    /**
     * Add a {@link ConnectionMonitor} to this connection. Can be invoked at any time,
     * but it is best to add connection monitors before invoking
     * <code>connect()</code> to avoid glitches (e.g., you add a connection monitor after
     * a successful connect(), but the connection has died in the mean time. Then,
     * your connection monitor won't be notified.) 
     * <p>
     * You can add as many monitors as you like.
     * 
     * @see ConnectionMonitor
     * @see #removeConnectionMonitor
     * 
     * @param cmon An object implementing the <code>ConnectionMonitor</code> interface.
     */
    public synchronized void addConnectionMonitor(ConnectionMonitor cmon)
    {
        if (cmon == null)
            throw new NullPointerException("cmon argument is null");
        if (connectionMonitors.contains(cmon))
            throw new IllegalArgumentException("monitor already exists");

        connectionMonitors.addElement(cmon);

        if (tm != null)
            tm.setConnectionMonitors(connectionMonitors);
    }

    /**
     * Remove a {@link ConnectionMonitor} from this connection.
     *
     * @see ConnectionMonitor
     * @see #addConnectionMonitor
     *
     * @param cmon An object implementing the <code>ConnectionMonitor</code> interface.
     */
    public synchronized void removeConnectionMonitor(ConnectionMonitor cmon)
    {
        if (!connectionMonitors.removeElement(cmon))
            throw new IllegalArgumentException("no such monitor");

        if (tm != null)
            tm.setConnectionMonitors(connectionMonitors);
    }

Original comment by [email protected] on 21 Jun 2012 at 4:04

from ganymed-ssh-2.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 2, 2024
Fixed in SVN

Original comment by cleondris on 1 Aug 2013 at 12:50

  • Changed state: Fixed

from ganymed-ssh-2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.