|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.alipay.remoting.util.ProtocolSwitch
public class ProtocolSwitch
Switches used in protocol
| Field Summary | |
|---|---|
static boolean |
CRC_SWITCH_DEFAULT_VALUE
|
static int |
CRC_SWITCH_INDEX
|
| Constructor Summary | |
|---|---|
ProtocolSwitch()
|
|
| Method Summary | |
|---|---|
static ProtocolSwitch |
create(int value)
create an instance of ProtocolSwitch according to byte value |
static ProtocolSwitch |
create(int[] index)
create an instance of ProtocolSwitch according to switch index |
boolean |
isOn(int switchIndex)
check switch whether on |
static boolean |
isOn(int switchIndex,
int value)
check switch status whether on according to specified value |
void |
setBs(BitSet bs)
Setter method for property bs. |
static BitSet |
toBitSet(int value)
from byte to bit set |
byte |
toByte()
generate byte value according to the bit set in ProtocolSwitchStatus |
static byte |
toByte(BitSet bs)
from bit set to byte |
void |
turnOn(int switchIndex)
api for user to turn on a feature |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int CRC_SWITCH_INDEX
public static final boolean CRC_SWITCH_DEFAULT_VALUE
| Constructor Detail |
|---|
public ProtocolSwitch()
| Method Detail |
|---|
public void turnOn(int switchIndex)
Switch
turnOn in interface SwitchswitchIndex - the switch index of featurepublic boolean isOn(int switchIndex)
Switch
isOn in interface Switchpublic byte toByte()
public static boolean isOn(int switchIndex,
int value)
switchIndex - value -
public static ProtocolSwitch create(int value)
ProtocolSwitch according to byte value
value -
public static ProtocolSwitch create(int[] index)
ProtocolSwitch according to switch index
index - the switch index which you want to set true
public static byte toByte(BitSet bs)
bs -
public static BitSet toBitSet(int value)
value -
public void setBs(BitSet bs)
bs - value to be assigned to property bs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||