1 // Copyright 2014 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 package org.chromium.mojo.system; 6 7 import org.chromium.mojo.system.DataPipe.ConsumerHandle; 8 import org.chromium.mojo.system.DataPipe.ProducerHandle; 9 10 /** 11 * A mojo handle of unknown type. This handle can be typed by using one of its methods, which will 12 * return a handle of the requested type and invalidate this object. No validation is made when the 13 * conversion operation is called. 14 */ 15 public interface UntypedHandle extends Handle { 16 17 /** 18 * @see org.chromium.mojo.system.Handle#pass() 19 */ 20 @Override pass()21 public UntypedHandle pass(); 22 23 /** 24 * Returns the underlying handle, as a {@link MessagePipeHandle}, invalidating this 25 * representation. 26 */ toMessagePipeHandle()27 public MessagePipeHandle toMessagePipeHandle(); 28 29 /** 30 * Returns the underlying handle, as a {@link ConsumerHandle}, invalidating this representation. 31 */ toDataPipeConsumerHandle()32 public ConsumerHandle toDataPipeConsumerHandle(); 33 34 /** 35 * Returns the underlying handle, as a {@link ProducerHandle}, invalidating this representation. 36 */ toDataPipeProducerHandle()37 public ProducerHandle toDataPipeProducerHandle(); 38 39 /** 40 * Returns the underlying handle, as a {@link SharedBufferHandle}, invalidating this 41 * representation. 42 */ toSharedBufferHandle()43 public SharedBufferHandle toSharedBufferHandle(); 44 45 } 46