message.java

来自「JAVA 所有包」· Java 代码 · 共 81 行

JAVA
81
字号
/* * @(#)Message.java	1.12 05/11/17 * * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */package com.sun.corba.se.impl.protocol.giopmsgheaders;import java.io.IOException;import java.nio.ByteBuffer;import com.sun.corba.se.spi.ior.iiop.GIOPVersion;/** * This is the base interface for different message type interfaces. * * @author Ram Jeyaraman 05/14/2000 * @version 1.0 */public interface Message {    // Generic constants    int defaultBufferSize = 1024;    int GIOPBigEndian = 0;    int GIOPLittleEndian = 1;    int GIOPBigMagic =    0x47494F50;    int GIOPLittleMagic = 0x504F4947;    int GIOPMessageHeaderLength = 12;    // Other useful constants    byte LITTLE_ENDIAN_BIT = 0x01;    byte MORE_FRAGMENTS_BIT = 0x02;    byte FLAG_NO_FRAG_BIG_ENDIAN = 0x00;    static final byte TRAILING_TWO_BIT_BYTE_MASK = 0x3;    static final byte THREAD_POOL_TO_USE_MASK = 0x3F;    // Encoding related constants    byte CDR_ENC_VERSION = 0x00;    byte JAVA_ENC_VERSION = 0x01;    // Message types    byte GIOPRequest = 0;    byte GIOPReply = 1;    byte GIOPCancelRequest = 2;    byte GIOPLocateRequest = 3;    byte GIOPLocateReply = 4;    byte GIOPCloseConnection = 5;    byte GIOPMessageError = 6;    byte GIOPFragment = 7; // 1.1 & 1.2:    // Accessor methods    GIOPVersion getGIOPVersion();    byte getEncodingVersion();    boolean isLittleEndian();    boolean moreFragmentsToFollow();    int getType();    int getSize();    ByteBuffer getByteBuffer();    int getThreadPoolToUse();    // Mutator methods    void read(org.omg.CORBA.portable.InputStream istream);    void write(org.omg.CORBA.portable.OutputStream ostream);    void setSize(ByteBuffer byteBuffer, int size);    FragmentMessage createFragmentMessage();    void callback(MessageHandler handler) throws IOException;    void setByteBuffer(ByteBuffer byteBuffer);    void setEncodingVersion(byte version);}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?