question: static boolean isAvailableForConnection ( ) { boolean available ; if ( _connectionInProgress . get ( ) ) { available = false ; } else { RequestReceiver receiver = _receiverRef . get ( ) ; boolean connected = false ; if ( receiver != null ) { try { receiver . getReceiverID ( ) ; connected = true ; } catch ( RemoteException e ) { } } available = ! connected ; } return available ; }
target:  If this session of MATLAB is available to be connected to from an external Java program. It will be available if it is not currently connected to and there is no connection in progress.