public void removeConnection ( Connection connection ) { if ( connection == null ) throw new IllegalArgumentException ( "connection cannot be null." ) ; connection . removeListener ( invokeListener ) ; synchronized ( connectionsLock ) { ArrayList < Connection > temp = new ArrayList ( Arrays . asList ( connections ) ) ; temp . remove ( connection ) ; connections = temp . toArray ( new Connection [ temp . size ( ) ] ) ; } if ( TRACE ) trace ( "kryonet" , "Removed connection from ObjectSpace: " + connection ) ; }
Removes the specified connection it will no longer be able to access objects registered in this ObjectSpace .