MARSHAL.java 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324
  1. /* MARSHAL.java --
  2. Copyright (C) 2005, 2006 Free Software Foundation, Inc.
  3. This file is part of GNU Classpath.
  4. GNU Classpath is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2, or (at your option)
  7. any later version.
  8. GNU Classpath is distributed in the hope that it will be useful, but
  9. WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with GNU Classpath; see the file COPYING. If not, write to the
  14. Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  15. 02110-1301 USA.
  16. Linking this library statically or dynamically with other modules is
  17. making a combined work based on this library. Thus, the terms and
  18. conditions of the GNU General Public License cover the whole
  19. combination.
  20. As a special exception, the copyright holders of this library give you
  21. permission to link this library with independent modules to produce an
  22. executable, regardless of the license terms of these independent
  23. modules, and to copy and distribute the resulting executable under
  24. terms of your choice, provided that you also meet, for each linked
  25. independent module, the terms and conditions of the license of that
  26. module. An independent module is a module which is not derived from
  27. or based on this library. If you modify this library, you may extend
  28. this exception to your version of the library, but you are not
  29. obligated to do so. If you do not wish to do so, delete this
  30. exception statement from your version. */
  31. package org.omg.CORBA;
  32. import java.io.Serializable;
  33. /**
  34. * Means that some request or reply from the network has a wrong size or is
  35. * structurally invalid. In GNU Classpath, this exception may have the following
  36. * minor codes (the high 20 bits being Classpath VMCID):
  37. *
  38. * <table border="1">
  39. * <tr>
  40. * <th>Hex</th>
  41. * <th>Dec</th>
  42. * <th>Minor</th>
  43. * <th>Name</th>
  44. * <th>Case</th>
  45. * </tr>
  46. * <tr>
  47. * <td>47430001</td>
  48. * <td>1195573249</td>
  49. * <td>1</td>
  50. * <td>Giop</td>
  51. * <td>The message being received is not a GIOP message. It does not start from
  52. * the expected magic sequence byte[] { 'G', 'I', 'O', 'P' }.</td>
  53. * </tr>
  54. * <tr>
  55. * <td>47430002</td>
  56. * <td>1195573250</td>
  57. * <td>2</td>
  58. * <td>Header</td>
  59. * <td>The unexpected IOException while reading or writing the GIOP message
  60. * header or the subsequent request or response header</td>
  61. * </tr>
  62. * <tr>
  63. * <td>47430003</td>
  64. * <td>1195573251</td>
  65. * <td>3</td>
  66. * <td>EOF</td>
  67. * <td>The data stream ended before reading all expected values from it. This
  68. * usually means that the CORBA message is corrupted, but may also indicate that
  69. * the server expects the remote method being invoked to have more or different
  70. * parameters</td>
  71. * </tr>
  72. * <tr>
  73. * <td>47430005</td>
  74. * <td>1195573253</td>
  75. * <td>5</td>
  76. * <td>CDR</td>
  77. * <td>The unexpected IOException while reading or writing the data via Commond
  78. * Data Representation stream</td>
  79. * </tr>
  80. * <tr>
  81. * <td>47430006</td>
  82. * <td>1195573254 </td>
  83. * <td>6</td>
  84. * <td>Value</td>
  85. * <td>The unexpected IOException while reading or writing the Value type.
  86. * </td>
  87. * </tr>
  88. * <tr>
  89. * <td>47430007 </td>
  90. * <td>1195573255</td>
  91. * <td>7</td>
  92. * <td>Forwarding</td>
  93. * <td>The unexpected IOException while handling request forwarding.</td>
  94. * </tr>
  95. * <tr>
  96. * <td>47430008</td>
  97. * <td>1195573256</td>
  98. * <td>8</td>
  99. * <td>Encapsulation </td>
  100. * <td>The unexpected IOException while handling data encapsulation, tagged
  101. * components, tagged profiles, etc.</td>
  102. * </tr>
  103. * <tr>
  104. * <td>47430009</td>
  105. * <td>1195573257</td>
  106. * <td>9 </td>
  107. * <td>Any</td>
  108. * <td>The unexpected IOException while inserting or extracting data to/from
  109. * the Any.</td>
  110. * </tr>
  111. * <tr>
  112. * <td>4743000a</td>
  113. * <td>1195573258 </td>
  114. * <td>10</td>
  115. * <td>UserException</td>
  116. * <td>The unexpected UserException in the context where it cannot be handled
  117. * as such and must be converted to the SystemException. </td>
  118. * </tr>
  119. * <tr>
  120. * <td>4743000b</td>
  121. * <td>1195573259</td>
  122. * <td>11</td>
  123. * <td>Inappropriate</td>
  124. * <td>While the operation could formally be applied to the target, the OMG
  125. * standard states that it is actually not applicable. For example, some CORBA
  126. * objects like POA are always local and should not be passed to or returned
  127. * from the remote side.</td>
  128. * </tr>
  129. * <tr>
  130. * <td>4743000c</td>
  131. * <td>1195573260</td>
  132. * <td>12</td>
  133. * <td>Negative</td>
  134. * <td>When reading data, it was discovered that size of the data structure
  135. * like string, sequence or character is written as the negative number.</td>
  136. * </tr>
  137. * <tr>
  138. * <td>4743000e</td>
  139. * <td>1195573262 </td>
  140. * <td>14</td>
  141. * <td>Graph</td>
  142. * <td>Reference to non-existing node in the data grapth while reading the
  143. * value types.</td>
  144. * </tr>
  145. * <tr>
  146. * <td>4743000f</td>
  147. * <td>1195573263</td>
  148. * <td>15</td>
  149. * <td>Boxed</td>
  150. * <td>Unexpected exception was thrown from the IDL type helper while handling
  151. * the object of this type as a boxed value.</td>
  152. * </tr>
  153. * <tr>
  154. * <td>47430010</td>
  155. * <td>1195573264</td>
  156. * <td>16</td>
  157. * <td>Instantiation</td>
  158. * <td>Unable to instantiate an value type object while reading it from the
  159. * stream.</td>
  160. * </tr>
  161. * <tr>
  162. * <td>47430011</td>
  163. * <td>1195573265</td>
  164. * <td>17</td>
  165. * <td>ValueHeaderTag</td>
  166. * <td>The header tag of the value type being read from the CDR stream contains
  167. * an unexpected value outside 0x7fffff00 .. 0x7fffffff and also not null and
  168. * not an indirection.</td>
  169. * </tr>
  170. * <tr>
  171. * <td>47430012</td>
  172. * <td>1195573266</td>
  173. * <td>18</td>
  174. * <td>ValueHeaderFlags</td>
  175. * <td>The header tag flags of the value type being read from the CDR stream
  176. * make the invalid combination (for instance, 0x7fffff04).</td>
  177. * </tr>
  178. * <tr>
  179. * <td>47430013</td>
  180. * <td>1195573267</td>
  181. * <td>19</td>
  182. * <td>ClassCast</td>
  183. * <td>The value type class, written on the wire, is not compatible with the
  184. * expected class, passed as a parameter to the InputStream.read_value.</td>
  185. * </tr>
  186. * <tr>
  187. * <td>47430014</td>
  188. * <td>1195573268</td>
  189. * <td>20</td>
  190. * <td>Offset</td>
  191. * <td>Positive or otherwise invalid indirection offset when reading the data
  192. * graph of the value type.</td>
  193. * </tr>
  194. * <tr>
  195. * <td>47430015</td>
  196. * <td>1195573269</td>
  197. * <td>21</td>
  198. * <td>Chunks</td>
  199. * <td>Errors while reading the chunked value type.</td>
  200. * </tr>
  201. * <tr>
  202. * <td>47430016</td>
  203. * <td>1195573270</td>
  204. * <td>22</td>
  205. * <td>UnsupportedValue</td>
  206. * <td>No means are provided to read or write this value type (not Streamable,
  207. * not CustomMarshal, not Serializable, no factory, no helper.</td>
  208. * </tr>
  209. * <tr>
  210. * <td>47430017</td>
  211. * <td>1195573271</td>
  212. * <td>23</td>
  213. * <td>Factory</td>
  214. * <td>The value factory, required for the operation being invoked, is not
  215. * registered with this ORB.</td>
  216. * </tr>
  217. * <tr>
  218. * <td>47430018</td>
  219. * <td>1195573272</td>
  220. * <td>24</td>
  221. *
  222. * <td>UnsupportedAddressing</td>
  223. * <td>Unsupported object addressing method in GIOP request header.</td>
  224. * </tr>
  225. * <tr>
  226. * <td>47430019</td>
  227. * <td>1195573273</td>
  228. * <td>25</td>
  229. * <td>IOR</td>
  230. * <td>Invalid object reference (IOR).</td>
  231. * </tr>
  232. * <tr>
  233. * <td>4743001a</td>
  234. * <td>1195573274</td>
  235. * <td>26</td>
  236. * <td>TargetConversion</td>
  237. * <td>Problems with converting between stubs, ties, interfaces and
  238. * implementations.</td>
  239. *
  240. * </tr>
  241. * <tr>
  242. * <td>4743001b</td>
  243. * <td>1195573275</td>
  244. * <td>27</td>
  245. * <td>ValueFields</td>
  246. * <td>Problems with reading or writing the fields of the value type object
  247. * </td>
  248. * </tr>
  249. * <tr>
  250. * <td>4743001c</td>
  251. * <td>1195573276</td>
  252. * <td>28</td>
  253. * <td>NonSerializable</td>
  254. * <td>The instance of the value type, passed using RMI over IIOP, is not
  255. * serializable</td>
  256. * </tr>
  257. * </table>
  258. *
  259. * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
  260. */
  261. public final class MARSHAL
  262. extends SystemException
  263. implements Serializable
  264. {
  265. /**
  266. * Use serialVersionUID for interoperability.
  267. */
  268. private static final long serialVersionUID = 7416408250336395546L;
  269. /**
  270. * Creates a MARSHAL with the default minor code of 0, completion state
  271. * COMPLETED_NO and the given explaining message.
  272. *
  273. * @param message the explaining message.
  274. */
  275. public MARSHAL(String message)
  276. {
  277. super(message, 0, CompletionStatus.COMPLETED_NO);
  278. }
  279. /**
  280. * Creates MARSHAL with the default minor code of 0 and a completion state
  281. * COMPLETED_NO.
  282. */
  283. public MARSHAL()
  284. {
  285. super("", 0, CompletionStatus.COMPLETED_NO);
  286. }
  287. /**
  288. * Creates a MARSHAL exception with the specified minor code and completion
  289. * status.
  290. *
  291. * @param minor_code additional error code.
  292. * @param is_completed the method completion status.
  293. */
  294. public MARSHAL(int minor_code, CompletionStatus is_completed)
  295. {
  296. super("", minor_code, is_completed);
  297. }
  298. /**
  299. * Created MARSHAL exception, providing full information.
  300. *
  301. * @param reason explaining message.
  302. * @param minor_code additional error code (the "minor").
  303. * @param is_completed the method completion status.
  304. */
  305. public MARSHAL(String reason, int minor_code, CompletionStatus is_completed)
  306. {
  307. super(reason, minor_code, is_completed);
  308. }
  309. }