1 7 8 package com.sun.corba.se.spi.servicecontext; 9 10 import org.omg.CORBA.SystemException ; 11 import org.omg.CORBA_2_3.portable.InputStream ; 12 import org.omg.CORBA_2_3.portable.OutputStream ; 13 import com.sun.corba.se.spi.ior.iiop.GIOPVersion; 14 import com.sun.corba.se.impl.encoding.MarshalInputStream ; 15 import com.sun.corba.se.impl.encoding.MarshalOutputStream ; 16 import com.sun.corba.se.impl.encoding.CodeSetComponentInfo ; 17 18 public class CodeSetServiceContext extends ServiceContext { 19 public CodeSetServiceContext( CodeSetComponentInfo.CodeSetContext csc ) 20 { 21 this.csc = csc ; 22 } 23 24 public CodeSetServiceContext(InputStream is, GIOPVersion gv) 25 { 26 super(is, gv) ; 27 csc = new CodeSetComponentInfo.CodeSetContext() ; 28 csc.read( (MarshalInputStream)in ) ; 29 } 30 31 public static final int SERVICE_CONTEXT_ID = 1 ; 33 public int getId() { return SERVICE_CONTEXT_ID ; } 34 35 public void writeData( OutputStream os ) throws SystemException 36 { 37 csc.write( (MarshalOutputStream)os ) ; 38 } 39 40 public CodeSetComponentInfo.CodeSetContext getCodeSetContext() 41 { 42 return csc ; 43 } 44 45 private CodeSetComponentInfo.CodeSetContext csc ; 46 47 public String toString() 48 { 49 return "CodeSetServiceContext[ csc=" + csc + " ]" ; 50 } 51 } 52 | Popular Tags |