public void close ( ) { Connection [ ] connections = this . connections ; for ( int i = 0 ; i < connections . length ; i ++ ) connections [ i ] . removeListener ( invokeListener ) ; synchronized ( instancesLock ) { ArrayList < ObjectSpace > temp = new ArrayList ( Arrays . asList ( instances ) ) ; temp . remove ( this ) ; instances = temp . toArray ( new ObjectSpace [ temp . size ( ) ] ) ; } if ( TRACE ) trace ( "kryonet" , "Closed ObjectSpace." ) ; }
Causes this ObjectSpace to stop listening to the connections for method invocation messages .