1 7 8 package com.sun.corba.se.impl.protocol.giopmsgheaders; 9 10 import java.io.IOException ; 11 import java.nio.ByteBuffer ; 12 import com.sun.corba.se.spi.ior.iiop.GIOPVersion; 13 14 20 21 public interface Message { 22 23 25 int defaultBufferSize = 1024; 26 int GIOPBigEndian = 0; 27 int GIOPLittleEndian = 1; 28 int GIOPBigMagic = 0x47494F50; 29 int GIOPLittleMagic = 0x504F4947; 30 int GIOPMessageHeaderLength = 12; 31 32 34 byte LITTLE_ENDIAN_BIT = 0x01; 35 byte MORE_FRAGMENTS_BIT = 0x02; 36 byte FLAG_NO_FRAG_BIG_ENDIAN = 0x00; 37 static final byte TRAILING_TWO_BIT_BYTE_MASK = 0x3; 38 static final byte THREAD_POOL_TO_USE_MASK = 0x3F; 39 40 42 byte CDR_ENC_VERSION = 0x00; 43 byte JAVA_ENC_VERSION = 0x01; 44 45 47 byte GIOPRequest = 0; 48 byte GIOPReply = 1; 49 byte GIOPCancelRequest = 2; 50 byte GIOPLocateRequest = 3; 51 byte GIOPLocateReply = 4; 52 byte GIOPCloseConnection = 5; 53 byte GIOPMessageError = 6; 54 byte GIOPFragment = 7; 56 58 GIOPVersion getGIOPVersion(); 59 byte getEncodingVersion(); 60 boolean isLittleEndian(); 61 boolean moreFragmentsToFollow(); 62 int getType(); 63 int getSize(); 64 ByteBuffer getByteBuffer(); 65 int getThreadPoolToUse(); 66 67 69 void read(org.omg.CORBA.portable.InputStream istream); 70 void write(org.omg.CORBA.portable.OutputStream ostream); 71 72 void setSize(ByteBuffer byteBuffer, int size); 73 74 FragmentMessage createFragmentMessage(); 75 76 void callback(MessageHandler handler) throws IOException ; 77 78 void setByteBuffer(ByteBuffer byteBuffer); 79 void setEncodingVersion(byte version); 80 } 81 | Popular Tags |