|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dellroad.jvser.ComPortCommand
org.dellroad.jvser.SignatureCommand
public class SignatureCommand
RFC 2217 SIGNATURE command.
| Field Summary | |
|---|---|
static String |
ENCODING
|
| Constructor Summary | |
|---|---|
SignatureCommand(boolean client)
Encoding constructor for signature requests. |
|
SignatureCommand(boolean client,
String signature)
Encoding constructor. |
|
SignatureCommand(int[] bytes)
Decoding constructor. |
|
| Method Summary | |
|---|---|
boolean |
decodeFailed()
|
String |
getSignature()
|
String |
toString()
Get the human-readable description of this option. |
void |
visit(ComPortCommandSwitch sw)
Apply visitor pattern. |
| Methods inherited from class org.dellroad.jvser.ComPortCommand |
|---|
equals, getBytes, getCommand, getName, hashCode, isServerCommand |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String ENCODING
| Constructor Detail |
|---|
public SignatureCommand(int[] bytes)
bytes - encoded option starting with the COM-PORT-OPTION byte
NullPointerException - if bytes is null
IllegalArgumentException - if bytes has length that is too short or too long
IllegalArgumentException - if bytes[0] is not RFC2217.COM_PORT_OPTION
IllegalArgumentException - if bytes[1] is not RFC2217.SIGNATURE (client or server)
public SignatureCommand(boolean client,
String signature)
signature - signature stringclient - true for the client-to-server command, false for the server-to-client commandpublic SignatureCommand(boolean client)
client - true for the client command, false for the server command| Method Detail |
|---|
public String toString()
ComPortCommand
toString in class ComPortCommandpublic void visit(ComPortCommandSwitch sw)
ComPortCommand
visit in class ComPortCommandsw - visitor switch handlerpublic String getSignature()
public boolean decodeFailed()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||