Package appeng.me.cache.helpers

Examples of appeng.me.cache.helpers.TunnelConnection


    {

      Iterator<TunnelConnection> i = connection.connections.values().iterator();
      while (i.hasNext())
      {
        TunnelConnection cw = i.next();
        try
        {
          if ( cw.tunnel.proxy.getGrid() != proxy.getGrid() )
          {
            cw.c.destroy();
            i.remove();
          }
          else if ( !cw.tunnel.proxy.isActive() )
          {
            cw.c.destroy();
            i.remove();
          }
        }
        catch (GridAccessException e)
        {
          // :P
        }
      }

      LinkedList<PartP2PTunnelME> newSides = new LinkedList<PartP2PTunnelME>();
      try
      {
        for (PartP2PTunnelME me : getOutputs())
        {
          if ( me.proxy.isActive() && connections.connections.get( me.getGridNode() ) == null )
          {
            newSides.add( me );
          }
        }

        for (PartP2PTunnelME me : newSides)
        {
          try
          {
            connections.connections.put( me.getGridNode(),
                new TunnelConnection( me, AEApi.instance().createGridConnection( outerProxy.getNode(), me.outerProxy.getNode() ) ) );
          }
          catch (FailedConnection e)
          {
            AELog.error( e );
            // :(
View Full Code Here

TOP

Related Classes of appeng.me.cache.helpers.TunnelConnection

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.