Core API 7.13

net.juniper.smgt.sae.router.command
Interface CommandChannel

All Known Implementing Classes:
UnsupportedCommandChannel

public interface CommandChannel

This class is used to send command to network device.


Field Summary
static java.lang.String SYNTAX_JUNOSCRIPT
          command channel syntax
static java.lang.String SYNTAX_SNMP
           
 
Method Summary
 java.lang.String getCommandSyntax()
          Get command channel syntax
 boolean isSupported()
          Check if command channel is available
 Response pushCommand(java.lang.String command, int timeout)
          send the command to network device.
 

Field Detail

SYNTAX_JUNOSCRIPT

static final java.lang.String SYNTAX_JUNOSCRIPT
command channel syntax

See Also:
Constant Field Values

SYNTAX_SNMP

static final java.lang.String SYNTAX_SNMP
See Also:
Constant Field Values
Method Detail

pushCommand

Response pushCommand(java.lang.String command,
                     int timeout)
                     throws CommandException
send the command to network device.

Parameters:
command, - command line for specific network device, e.g. for Junos router, it should be Junos script in XML format.
timeout, - time out before response arrived, if it is -1, the router default timeout will be used.
Returns:
Response, the response message from network device.
Throws:
CommandException, - thrown if anything failed.
CommandException

isSupported

boolean isSupported()
Check if command channel is available

Returns:
true if command channel is available

getCommandSyntax

java.lang.String getCommandSyntax()
Get command channel syntax

Returns:
one of the command syntax e.g. 'JUNOScript', 'JUNOSe_SNMP'

Core API 7.13