00001 /* 00002 * InterruptedIOException.hpp 00003 * 00004 * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. 00005 * 00006 * Oracle is a registered trademarks of Oracle Corporation and/or its 00007 * affiliates. 00008 * 00009 * This software is the confidential and proprietary information of Oracle 00010 * Corporation. You shall not disclose such confidential and proprietary 00011 * information and shall use it only in accordance with the terms of the 00012 * license agreement you entered into with Oracle. 00013 * 00014 * This notice may not be removed or altered. 00015 */ 00016 #ifndef COH_INTERRUPTED_IO_EXCEPTION_HPP 00017 #define COH_INTERRUPTED_IO_EXCEPTION_HPP 00018 00019 #include "coherence/lang.ns" 00020 00021 #include "coherence/io/IOException.hpp" 00022 00023 COH_OPEN_NAMESPACE2(coherence,io) 00024 00025 00026 /** 00027 * Signals that the current thread has been interrupted while blocked on IO. 00028 */ 00029 class COH_EXPORT InterruptedIOException 00030 : public throwable_spec<InterruptedIOException, 00031 extends<IOException> > 00032 { 00033 friend class factory<InterruptedIOException>; 00034 00035 // ----- constructors --------------------------------------------------- 00036 00037 protected: 00038 /** 00039 * Create an InterruptedIOException. 00040 * 00041 * @param vsMsg the detail message 00042 * @param cBytesTransfered the number of bytes transfered during the 00043 * blocked operation prior to the interrupt 00044 * @param vCause the underlying cause of the exception 00045 * 00046 * @return a new InterruptedIOException 00047 */ 00048 InterruptedIOException(String::View vsMsg = String::null_string, 00049 size32_t cBytesTransfered = 0, 00050 Exception::View vCause = NULL); 00051 00052 // ----- InterruptedIOException ----------------------------------------- 00053 00054 public: 00055 /** 00056 * Return the number of bytes trasfered during the blocking operation 00057 * prior to the interrupt. 00058 */ 00059 virtual size32_t getBytesTransfered() const; 00060 00061 00062 // ----- data members --------------------------------------------------- 00063 00064 public: 00065 /** 00066 * The number of bytes transfered during the blocking operation prior 00067 * to the interrupt. 00068 */ 00069 size32_t m_cBytesTransfered; 00070 }; 00071 00072 COH_CLOSE_NAMESPACE2 00073 00074 #endif // COH_INTERRUPTED_IO_EXCEPTION_HPP