Beispiel #1
0
 internal static void addPort(Session session, int port, String daemon, Object[] arg)
 {
     lock(pool)
     {
         if(getPort(session, port)!=null)
         {
             throw new JSchException("PortForwardingR: remote port "+port+" is already registered.");
         }
         Object[] foo=new Object[4];
         foo[0]=session; foo[1]=new Integer(port);
         foo[2]=daemon; foo[3]=arg;
         pool.addElement(foo);
     }
 }
Beispiel #2
0
 internal static void addPort(Session session, int port, String target, int lport, SocketFactory factory)
 {
     lock(pool)
     {
         if(getPort(session, port)!=null)
         {
             throw new JSchException("PortForwardingR: remote port "+port+" is already registered.");
         }
         Object[] foo=new Object[5];
         foo[0]=session; foo[1]=new Integer(port);
         foo[2]=target; foo[3]=new Integer(lport);
         foo[4]=factory;
         pool.addElement(foo);
     }
 }