1 28 29 package com.caucho.iiop; 30 31 import java.io.IOException ; 32 33 public class Iiop10Writer extends IiopWriter { 34 39 public void startRequest(byte []oid, int off, int len, 40 String operation, int requestId) 41 throws IOException 42 { 43 startMessage(IiopReader.MSG_REQUEST); 44 45 writeRequestServiceControlList(); 47 write_long(requestId); _out.write(1); 50 writeBytes(oid, off, len); writeString(operation); 52 writeNull(); } 54 55 58 public void startReplyOk(int requestId) 59 throws IOException 60 { 61 startMessage(IiopReader.MSG_REPLY); 62 63 write_long(0); write_long(requestId); write_long(IiopReader.STATUS_NO_EXCEPTION); } 67 68 71 public void startReplySystemException(int requestId, 72 String exceptionId, 73 int minorStatus, 74 int completionStatus) 75 throws IOException 76 { 77 startMessage(IiopReader.MSG_REPLY); 78 79 write_long(0); write_long(requestId); write_long(IiopReader.STATUS_SYSTEM_EXCEPTION); 82 83 writeString(exceptionId); 84 write_long(minorStatus); 85 write_long(completionStatus); 86 } 87 88 91 public void startReplyUserException(int requestId) 92 throws IOException 93 { 94 startMessage(IiopReader.MSG_REPLY); 95 96 write_long(0); write_long(requestId); write_long(IiopReader.STATUS_USER_EXCEPTION); 99 } 100 101 104 protected void startMessage(int type) 105 throws IOException 106 { 107 _out.start10Message(type); 108 } 109 } 110 | Popular Tags |