Logo Search packages:      
Sourcecode: jenkins-trilead-ssh2 version File versions  Download package

synchronized void com::trilead::ssh2::Connection::addConnectionMonitor ( ConnectionMonitor  cmon ) [inline]

Add a ConnectionMonitor to this connection. Can be invoked at any time, but it is best to add connection monitors before invoking connect() 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.)

You can add as many monitors as you like.

See also:
ConnectionMonitor
Parameters:
cmonAn object implementing the ConnectionMonitor interface.

Definition at line 500 of file Connection.java.

      {
            if (cmon == null)
                  throw new IllegalArgumentException("cmon argument is null");

            connectionMonitors.addElement(cmon);

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

Generated by  Doxygen 1.6.0   Back to index