KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > corba > se > spi > servicecontext > UEInfoServiceContext


1 /*
2  * @(#)UEInfoServiceContext.java 1.16 04/06/21
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package com.sun.corba.se.spi.servicecontext;
9
10 import java.io.Serializable JavaDoc ;
11 import org.omg.CORBA.SystemException JavaDoc;
12 import org.omg.CORBA.CompletionStatus JavaDoc;
13 import org.omg.CORBA.UNKNOWN JavaDoc;
14 import org.omg.CORBA_2_3.portable.InputStream JavaDoc;
15 import org.omg.CORBA_2_3.portable.OutputStream JavaDoc;
16 import com.sun.corba.se.spi.ior.iiop.GIOPVersion;
17 import com.sun.corba.se.spi.servicecontext.ServiceContext ;
18
19 public class UEInfoServiceContext extends ServiceContext {
20     public UEInfoServiceContext( Throwable JavaDoc ex )
21     {
22     unknown = ex ;
23     }
24
25     public UEInfoServiceContext(InputStream JavaDoc is, GIOPVersion gv)
26     {
27     super(is, gv) ;
28
29     try {
30         unknown = (Throwable JavaDoc) in.read_value() ;
31     } catch (ThreadDeath JavaDoc d) {
32         throw d ;
33     } catch (Throwable JavaDoc e) {
34         unknown = new UNKNOWN JavaDoc( 0, CompletionStatus.COMPLETED_MAYBE ) ;
35     }
36     }
37
38     // Required SERVICE_CONTEXT_ID and getId definitions
39
public static final int SERVICE_CONTEXT_ID = 9 ;
40     public int getId() { return SERVICE_CONTEXT_ID ; }
41
42     public void writeData( OutputStream JavaDoc os ) throws SystemException JavaDoc
43     {
44     os.write_value( (Serializable JavaDoc)unknown ) ;
45     }
46
47     public Throwable JavaDoc getUE() { return unknown ; }
48
49     private Throwable JavaDoc unknown = null ;
50
51     public String JavaDoc toString()
52     {
53     return "UEInfoServiceContext[ unknown=" + unknown.toString() + " ]" ;
54     }
55 }
56
57
58
Popular Tags