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