com.hp.ucmdb.discovery.library.clients.shell
Class TelnetClient
java.lang.Object
com.hp.ucmdb.discovery.library.clients.BaseClient
com.hp.ucmdb.discovery.library.clients.shell.ShellClient
com.hp.ucmdb.discovery.library.clients.shell.TelnetClient
public class TelnetClient
- extends ShellClient
TelnetClient
runs shell commands using Telnet.
For a creation example see ShellClient
.
Properties that can be redefined for TelnetClient:
- Output matching (matchers)
The matchers list property (java.util.List
) specified by
AgentConstants.PROP_AGENT_OUTPUT_MATCHERS
is the list of strings
that indicate end-of-output to the client.
If no matchers are found, commands return after the timeout.
- All Protocol properties can be redefined in properties when
creating the client.
See the creation example in the ShellClient
reference.
- See Also:
ShellClient
,
ClientFactory
Constructor Summary |
TelnetClient(ClientsFrameworkImpl framework,
java.util.Properties props)
|
Methods inherited from class com.hp.ucmdb.discovery.library.clients.shell.ShellClient |
canCopyFile, deleteFile, executeCmd, executeCmd, executeCmd, executeCmd, executeCmdWithTimeOut, getFile, getLastCommandOutputBytes, getMaxCommandLength, getServerPort, getWelcomeBuffer, putFile, setCharset, setMaxCommandLength |
Methods inherited from class com.hp.ucmdb.discovery.library.clients.BaseClient |
close, getClientType, getCredentialId, getIpAddress, getProperty, getShellCmdSeperator, getSudoCommands, getSudoPaths, getTimeout, getUserName, isConnected |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TelnetClient
public TelnetClient(ClientsFrameworkImpl framework,
java.util.Properties props)
throws java.lang.Exception
- Throws:
java.lang.Exception
getPort
public int getPort()
throws java.lang.Exception
- Returns the port from the protocol definition.
The port can be overidden in the properties at client creation.
- Returns:
- The SSH port for client connection
- Throws:
java.lang.Exception
- See Also:
ClientFactory
getWelcomeBanner
public java.lang.String getWelcomeBanner()
throws java.lang.Exception
- Returns the host's welcome banner.
This information is available after the connection is made.
- Returns:
- The welcome banner
- Throws:
java.lang.Exception
getLoginMessage
public java.lang.String getLoginMessage()
throws java.lang.Exception
- Returns the host's login message.
This information is available after the connection is made.
- Returns:
- The login message
- Throws:
java.lang.Exception
supportsSudo
public boolean supportsSudo()
- Overrides:
supportsSudo
in class BaseClient
Documentation Feedback
Copyright 2010 Hewlett-Packard Development Company, L.P.