|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sdnplatform.sync.client.ShellCommand
public abstract class ShellCommand
A user command for the command line client
| Field Summary | |
|---|---|
protected static com.fasterxml.jackson.databind.ObjectMapper |
mapper
|
protected static com.fasterxml.jackson.databind.MappingJsonFactory |
mjf
|
| Constructor Summary | |
|---|---|
ShellCommand()
|
|
| Method Summary | |
|---|---|
abstract boolean |
execute(java.lang.String[] tokens,
java.lang.String line)
Execute the command on the given tokens |
protected byte[] |
serializeJson(com.fasterxml.jackson.databind.JsonNode value)
Serialize a JSON object as bytes |
abstract java.lang.String |
syntaxString()
Return syntax description |
protected com.fasterxml.jackson.databind.JsonNode |
validateJson(com.fasterxml.jackson.core.JsonParser jp)
Parse a JSON object |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final com.fasterxml.jackson.databind.ObjectMapper mapper
protected static final com.fasterxml.jackson.databind.MappingJsonFactory mjf
| Constructor Detail |
|---|
public ShellCommand()
| Method Detail |
|---|
public abstract boolean execute(java.lang.String[] tokens,
java.lang.String line)
throws java.lang.Exception
tokens - the argument tokens. The first token will be the commandline - the whole command line
java.lang.Exceptionpublic abstract java.lang.String syntaxString()
protected com.fasterxml.jackson.databind.JsonNode validateJson(com.fasterxml.jackson.core.JsonParser jp)
throws java.io.IOException
jp - the JSON parse
java.io.IOException
protected byte[] serializeJson(com.fasterxml.jackson.databind.JsonNode value)
throws java.lang.Exception
value - the object to serialize
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||