1 45 package org.openejb.client; 46 47 import java.io.IOException ; 48 import java.io.ObjectInput ; 49 import java.io.ObjectOutput ; 50 51 56 public class JNDIRequest implements Request { 57 58 private transient int requestMethod = -1; 59 private transient String requestString; 60 61 public JNDIRequest() { 62 } 63 64 public JNDIRequest(int requestMethod, String requestString) { 65 this.requestMethod = requestMethod; 66 this.requestString = requestString; 67 } 68 69 public byte getRequestType(){ 70 return JNDI_REQUEST; 71 } 72 73 public int getRequestMethod(){ 74 return requestMethod; 75 } 76 77 public String getRequestString(){ 78 return requestString; 79 } 80 81 public void setRequestMethod(int requestMethod){ 82 this.requestMethod = requestMethod; 83 } 84 85 public void setRequestString(String requestString){ 86 this.requestString = requestString; 87 } 88 89 90 102 public void readExternal(ObjectInput in) throws IOException ,ClassNotFoundException { 103 requestMethod = in.readByte(); 104 requestString = in.readUTF(); 105 } 106 121 public void writeExternal(ObjectOutput out) throws IOException { 122 out.writeByte((byte)requestMethod); 123 out.writeUTF (requestString); 124 } 125 126 } 127 128 129 | Popular Tags |