/** * Remove and stop all sinks in the pipeline. */ public void clearSinks() { for (VehicleDataSink mSink : mSinks) { (mSink).stop(); } mSinks.clear(); }
for (VehicleDataSink sink : mSinks) { try { sink.receive(message); } catch (DataSinkException e) { Log.w(TAG, this.getClass().getName() + ": The sink " +
/** * Remove a previously added sink from the pipeline. * * Once removed, the sink will no longer receive any new messages from * the pipeline's sources. The sink's {@link VehicleDataSink#stop()} method * is also called. * * @param sink if the value is null, it is ignored. */ public void removeSink(VehicleDataSink sink) { if(sink != null) { mSinks.remove(sink); sink.stop(); } }
/** * Remove a previously registered sink from the data pipeline. */ public void removeSink(VehicleDataSink sink) { if(sink != null) { mRemoteOriginPipeline.removeSink(sink); sink.stop(); } }