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.
5 package org.chromium.mojo.system;
7 import org.chromium.mojo.system.DataPipe.ConsumerHandle;
8 import org.chromium.mojo.system.DataPipe.ProducerHandle;
11 * Implementation of {@link UntypedHandle}.
13 class UntypedHandleImpl extends HandleImpl implements UntypedHandle {
16 * @see HandleImpl#HandleImpl(CoreImpl, int)
18 UntypedHandleImpl(CoreImpl core, int mojoHandle) {
19 super(core, mojoHandle);
23 * @see org.chromium.mojo.system.UntypedHandle#toMessagePipeHandle()
26 public MessagePipeHandle toMessagePipeHandle() {
27 return new MessagePipeHandleImpl(this);
31 * @see org.chromium.mojo.system.UntypedHandle#toDataPipeConsumerHandle()
34 public ConsumerHandle toDataPipeConsumerHandle() {
35 return new DataPipeConsumerHandleImpl(this);
39 * @see org.chromium.mojo.system.UntypedHandle#toDataPipeProducerHandle()
42 public ProducerHandle toDataPipeProducerHandle() {
43 return new DataPipeProducerHandleImpl(this);
47 * @see org.chromium.mojo.system.UntypedHandle#toSharedBufferHandle()
50 public SharedBufferHandle toSharedBufferHandle() {
51 return new SharedBufferHandleImpl(this);