public VehicleMessage get ( MessageKey key ) throws NoValueException { if ( mRemoteService == null ) { Log . w ( TAG , "Not connected to the VehicleService -- " + "throwing a NoValueException" ) ; throw new NoValueException ( ) ; } try { VehicleMessage message = mRemoteService . get ( key ) ; if ( message == null ) { throw new NoValueException ( ) ; } return message ; } catch ( RemoteException | ClassCastException e ) { Log . w ( TAG , "Unable to get value from remote vehicle service" , e ) ; throw new NoValueException ( ) ; } }
Retrieve the most current value of a keyed message .