Package org.onosproject.cli.net
Class LinksListCommand
- java.lang.Object
- 
- org.onosproject.cli.AbstractShellCommand
- 
- org.onosproject.cli.net.LinksListCommand
 
 
- 
- All Implemented Interfaces:
- org.apache.karaf.shell.api.action.Action,- CodecContext
 
 public class LinksListCommand extends AbstractShellCommand Lists all infrastructure links.
- 
- 
Field Summary- 
Fields inherited from class org.onosproject.cli.AbstractShellCommandlog
 
- 
 - 
Constructor SummaryConstructors Constructor Description LinksListCommand()
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StringcompactLinkString(Link link)Returns a compact string representing the given link.protected voiddoExecute()Body of the shell command.static com.fasterxml.jackson.databind.JsonNodejson(AbstractShellCommand context, Iterable<Link> links)Produces a JSON array containing the specified links.static com.fasterxml.jackson.databind.node.ObjectNodejson(AbstractShellCommand context, Link link)Produces a JSON object for the specified link.static StringlinkString(Link link)Returns a formatted string representing the given link.- 
Methods inherited from class org.onosproject.cli.AbstractShellCommandannotations, annotations, annotations, appId, codec, error, execute, get, getService, jsonForEntity, mapper, outputJson, print
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.onosproject.codec.CodecContextdecode, encode
 
- 
 
- 
- 
- 
Method Detail- 
doExecuteprotected void doExecute() Description copied from class:AbstractShellCommandBody of the shell command.- Specified by:
- doExecutein class- AbstractShellCommand
 
 - 
jsonpublic static com.fasterxml.jackson.databind.JsonNode json(AbstractShellCommand context, Iterable<Link> links) Produces a JSON array containing the specified links.- Parameters:
- context- context to use for looking up codecs
- links- collection of links
- Returns:
- JSON array
 
 - 
jsonpublic static com.fasterxml.jackson.databind.node.ObjectNode json(AbstractShellCommand context, Link link) Produces a JSON object for the specified link.- Parameters:
- context- context to use for looking up codecs
- link- link to encode
- Returns:
- JSON object
 
 - 
linkStringpublic static String linkString(Link link) Returns a formatted string representing the given link.- Parameters:
- link- infrastructure link
- Returns:
- formatted link string
 
 
- 
 
-