1. /*
  2. * @(#)UEInfoServiceContext.java 1.13 03/01/23
  3. *
  4. * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package com.sun.corba.se.internal.core;
  8. import java.io.Serializable ;
  9. import org.omg.CORBA.SystemException;
  10. import org.omg.CORBA.CompletionStatus;
  11. import org.omg.CORBA.UNKNOWN;
  12. import org.omg.CORBA_2_3.portable.InputStream;
  13. import org.omg.CORBA_2_3.portable.OutputStream;
  14. import com.sun.corba.se.internal.core.ServiceContext ;
  15. public class UEInfoServiceContext extends ServiceContext {
  16. public UEInfoServiceContext( Throwable ex )
  17. {
  18. unknown = ex ;
  19. }
  20. public UEInfoServiceContext(InputStream is, GIOPVersion gv)
  21. {
  22. super(is, gv) ;
  23. try {
  24. unknown = (Throwable) in.read_value() ;
  25. } catch (ThreadDeath d) {
  26. throw d ;
  27. } catch (Throwable e) {
  28. unknown = new UNKNOWN( 0, CompletionStatus.COMPLETED_MAYBE ) ;
  29. }
  30. }
  31. // Required SERVICE_CONTEXT_ID and getId definitions
  32. public static final int SERVICE_CONTEXT_ID = 9 ;
  33. public int getId() { return SERVICE_CONTEXT_ID ; }
  34. public void writeData( OutputStream os ) throws SystemException
  35. {
  36. os.write_value( (Serializable)unknown ) ;
  37. }
  38. public Throwable getUE() { return unknown ; }
  39. private Throwable unknown = null ;
  40. public String toString()
  41. {
  42. return "UEInfoServiceContext[ unknown=" + unknown.toString() + " ]" ;
  43. }
  44. }