| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 package org.chromium.mojo.system; | 5 package org.chromium.mojo.system; |
| 6 | 6 |
| 7 import org.chromium.mojo.system.Core.HandleSignalsState; | 7 import org.chromium.mojo.system.Core.HandleSignals; |
| 8 import org.chromium.mojo.system.Core.WaitResult; |
| 8 import org.chromium.mojo.system.DataPipe.ConsumerHandle; | 9 import org.chromium.mojo.system.DataPipe.ConsumerHandle; |
| 9 import org.chromium.mojo.system.DataPipe.ProducerHandle; | 10 import org.chromium.mojo.system.DataPipe.ProducerHandle; |
| 10 | 11 |
| 11 import java.nio.ByteBuffer; | 12 import java.nio.ByteBuffer; |
| 12 import java.util.List; | 13 import java.util.List; |
| 13 | 14 |
| 14 /** | 15 /** |
| 15 * A handle that will always be invalid. | 16 * A handle that will always be invalid. |
| 16 */ | 17 */ |
| 17 public class InvalidHandle implements UntypedHandle, MessagePipeHandle, Consumer
Handle, | 18 public class InvalidHandle implements UntypedHandle, MessagePipeHandle, Consumer
Handle, |
| (...skipping 12 matching lines...) Expand all Loading... |
| 30 | 31 |
| 31 /** | 32 /** |
| 32 * @see Handle#close() | 33 * @see Handle#close() |
| 33 */ | 34 */ |
| 34 @Override | 35 @Override |
| 35 public void close() { | 36 public void close() { |
| 36 // Do nothing. | 37 // Do nothing. |
| 37 } | 38 } |
| 38 | 39 |
| 39 /** | 40 /** |
| 40 * @see Handle#querySignalsState() | 41 * @see Handle#wait(Core.HandleSignals, long) |
| 41 */ | 42 */ |
| 42 @Override | 43 @Override |
| 43 public HandleSignalsState querySignalsState() { | 44 public WaitResult wait(HandleSignals signals, long deadline) { |
| 44 throw new MojoException(MojoResult.INVALID_ARGUMENT); | 45 throw new MojoException(MojoResult.INVALID_ARGUMENT); |
| 45 } | 46 } |
| 46 | 47 |
| 47 /** | 48 /** |
| 48 * @see Handle#isValid() | 49 * @see Handle#isValid() |
| 49 */ | 50 */ |
| 50 @Override | 51 @Override |
| 51 public boolean isValid() { | 52 public boolean isValid() { |
| 52 return false; | 53 return false; |
| 53 } | 54 } |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 /** | 211 /** |
| 211 * @see MessagePipeHandle#readMessage(java.nio.ByteBuffer, int, MessagePipeH
andle.ReadFlags) | 212 * @see MessagePipeHandle#readMessage(java.nio.ByteBuffer, int, MessagePipeH
andle.ReadFlags) |
| 212 */ | 213 */ |
| 213 @Override | 214 @Override |
| 214 public ResultAnd<ReadMessageResult> readMessage( | 215 public ResultAnd<ReadMessageResult> readMessage( |
| 215 ByteBuffer bytes, int maxNumberOfHandles, ReadFlags flags) { | 216 ByteBuffer bytes, int maxNumberOfHandles, ReadFlags flags) { |
| 216 throw new MojoException(MojoResult.INVALID_ARGUMENT); | 217 throw new MojoException(MojoResult.INVALID_ARGUMENT); |
| 217 } | 218 } |
| 218 | 219 |
| 219 } | 220 } |
| OLD | NEW |