001/* 002 GRANITE DATA SERVICES 003 Copyright (C) 2013 GRANITE DATA SERVICES S.A.S. 004 005 This file is part of Granite Data Services. 006 007 Granite Data Services is free software; you can redistribute it and/or modify 008 it under the terms of the GNU Library General Public License as published by 009 the Free Software Foundation; either version 2 of the License, or (at your 010 option) any later version. 011 012 Granite Data Services is distributed in the hope that it will be useful, but 013 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 014 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License 015 for more details. 016 017 You should have received a copy of the GNU Library General Public License 018 along with this library; if not, see <http://www.gnu.org/licenses/>. 019*/ 020 021package org.granite.messaging.jmf; 022 023import java.nio.charset.Charset; 024 025/** 026 * @author Franck WOLFF 027 */ 028public interface JMFConstants { 029 030 static final String CLIENT_PERSISTENCE_COLLECTION_PACKAGE = "org.granite.client.persistence.collection"; 031 032 static final Charset UTF8 = Charset.forName("UTF-8"); 033 034 // Types with 4 bits of parameters (bit 4 always 0) 035 036 static final int JMF_CLASS = 0x00; // JMF_XXXX_0000 037 static final int JMF_OBJECT = 0x01; // JMF_XXXX_0001 038 static final int JMF_ENUM = 0x02; // JMF_XXXX_0010 039 static final int JMF_ARRAY = 0x03; // JMF_XXXX_0011 040 static final int JMF_LONG = 0x04; // JMF_XXXX_0100 041 static final int JMF_LONG_OBJECT = 0x05; // JMF_XXXX_0101 042 043 static final int JMF_XXXX_0110 = 0x06; 044 static final int JMF_XXXX_0111 = 0x07; 045 046 // Types with 3 bits of parameters (bit 5 always 0, bit 4 always 1) 047 048 static final int JMF_INTEGER = 0x08; // JMF_XXX0_1000 049 static final int JMF_INTEGER_OBJECT = 0x09; // JMF_XXX0_1001 050 static final int JMF_STRING = 0x0A; // JMF_XXX0_1010 051 static final int JMF_ARRAY_LIST = 0x0B; // JMF_XXX0_1011 052 static final int JMF_HASH_SET = 0x0C; // JMF_XXX0_1100 053 static final int JMF_HASH_MAP = 0x0D; // JMF_XXX0_1101 054 static final int JMF_BIG_INTEGER = 0x0E; // JMF_XXX0_1110 055 static final int JMF_BIG_DECIMAL = 0x0F; // JMF_XXX0_1111 056 057 // Types with 2 bits of parameters (bit 6 always 0, bit 5 and 4 always 1) 058 static final int JMF_SHORT = 0x18; // JMF_XX01_1000 059 static final int JMF_SHORT_OBJECT = 0x19; // JMF_XX01_1001 060 061 static final int JMF_XX01_1010 = 0x1A; 062 static final int JMF_XX01_1011 = 0x1B; 063 static final int JMF_XX01_1100 = 0x1C; 064 static final int JMF_XX01_1101 = 0x1D; 065 static final int JMF_XX01_1110 = 0x1E; 066 static final int JMF_XX01_1111 = 0x1F; 067 068 // Types with 1 bit of parameters (bit 7 always 0, bit 6, 5 and 4 always 1) 069 070 static final int JMF_BOOLEAN = 0x38; // JMF_X011_1000 071 static final int JMF_BOOLEAN_OBJECT = 0x39; // JMF_X011_1001 072 static final int JMF_CHARACTER = 0x3A; // JMF_X011_1010 073 static final int JMF_CHARACTER_OBJECT = 0x3B; // JMF_X011_1011 074 static final int JMF_DOUBLE = 0x3C; // JMF_X011_1100 075 static final int JMF_DOUBLE_OBJECT = 0x3D; // JMF_X011_1101 076 077 static final int JMF_X011_1110 = 0x3E; 078 static final int JMF_X011_1111 = 0x3F; 079 080 // Types with 0 bit of parameters (bit 7, 6, 5 and 4 always 1) 081 082 static final int JMF_NULL = 0x78; // JMF_0111_1000 083 static final int JMF_OBJECT_END = 0x79; // JMF_0111_1001 084 static final int JMF_BYTE = 0x7A; // JMF_0111_1010 085 static final int JMF_BYTE_OBJECT = 0x7B; // JMF_0111_1011 086 static final int JMF_FLOAT = 0x7C; // JMF_0111_1100 087 static final int JMF_FLOAT_OBJECT = 0x7D; // JMF_0111_1101 088 static final int JMF_DATE = 0x7E; // JMF_0111_1110 089 090 static final int JMF_0111_1111 = 0x7F; 091 092 static final int JMF_1111_1000 = 0xF8; 093 static final int JMF_1111_1001 = 0xF9; 094 static final int JMF_1111_1010 = 0xFA; 095 static final int JMF_1111_1011 = 0xFB; 096 static final int JMF_1111_1100 = 0xFC; 097 static final int JMF_1111_1101 = 0xFD; 098 static final int JMF_1111_1110 = 0xFE; 099 static final int JMF_1111_1111 = 0xFF; 100}