|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.adventnet.cli.transport.TelnetProtocolOptionsImpl
This class provides the Telnet implementation of the CLIProtocolOptions
interface. It contains parameters like the Remote Host Address, Port,
login parameters, etc. In order to establish a CLI session over Telnet
with a particular device the appropriate parameters has to be set on
an instance of this class and passed to the CLISession's constructor.
A subsequent call to the open() method in CLISession will establish the
Telnet connection based on the parameters set here.
| Constructor Summary | |
TelnetProtocolOptionsImpl()
Constructs ProtocolOptions for Telnet Connections. |
|
| Method Summary | |
java.lang.Object |
clone()
Returns an exact copy of this object. |
ConnectionHandler |
getConnectionHandler()
Gets the connection handler used for the telnet protocol connection. |
java.lang.Object |
getID()
Gets the Key based on the combination of remoteHost, Port and login name. |
java.lang.String |
getInitialMessage()
Gets the initial message sent by the device after a connection is established. |
java.lang.String |
getLoginName()
Gets the login Name. |
java.lang.String |
getLoginPrompt()
Gets the login prompt. |
int |
getLoginTimeout()
Gets the login Time-out of the Telnet connection. |
java.lang.String |
getPasswdPrompt()
Gets the password prompt. |
java.lang.String |
getPassword()
Gets the login Password. |
java.lang.String |
getPrompt()
Gets the Prompt. |
java.util.Properties |
getProperties()
Gets the list of properties on this CLIProperty instance. |
java.lang.String |
getRemoteHost()
Gets the Remote Host name or IP address. |
int |
getRemotePort()
Gets the Remote Port. |
java.lang.String |
getTerminalType()
Gets the terminal type. |
boolean |
isPerformPing()
Gets the perform ping flag. |
void |
setConnectionHandler(ConnectionHandler ch)
This method is used to set the connection handler for the telnet protocol connection. |
void |
setInitialMessage(java.lang.String message)
Sets the initial message sent by the device after a connection is established. |
void |
setLoginName(java.lang.String loginName)
Sets the login Name. |
void |
setLoginPrompt(java.lang.String loginPrompt)
Sets the login prompt. |
void |
setLoginTimeout(int timeout)
Sets the login time-out. |
void |
setPasswdPrompt(java.lang.String passwdPrompt)
Sets the password prompt. |
void |
setPassword(java.lang.String passwd)
Sets the login Password. |
void |
setPerformPing(boolean flag)
Sets the perform ping flag. |
void |
setPrompt(java.lang.String prompt)
Sets the Prompt. |
void |
setProperties(java.util.Properties properties)
Sets a list of properties on this CLIProperty instance. |
void |
setRemoteHost(java.lang.String remoteHost)
Sets the Remote Host name or IP address in dotted format. |
void |
setRemotePort(int remotePort)
Sets the Remote Port. |
void |
setTerminalType(java.lang.String type)
Sets the terminal type. |
| Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public TelnetProtocolOptionsImpl()
For example to set various protocol options the following can be done:
TelnetProtocolOptionsImpl protocolOptions = new TelnetProtocolOptions()
protocolOptions.setRemoteHost("localhost");
protocolOptions.setRemotePort(23);
protocolOptions.setLoginName("guest");
protocolOptions.setPassword("guest");
protocolOptions.setPrompt("$");
CLIMessage msg = new CLIMessage("date");
msg.setCLIProtocolOptions(protocolOptions);
cliSess.syncSend(msg);
| Method Detail |
public void setRemoteHost(java.lang.String remoteHost)
remoteHost - the remoteHost to connect.public java.lang.String getRemoteHost()
public void setRemotePort(int remotePort)
remotePort - the remotePort to connect with.public int getRemotePort()
public java.lang.Object getID()
public void setLoginName(java.lang.String loginName)
loginName - the login user Name for the connection.public java.lang.String getLoginName()
public void setPassword(java.lang.String passwd)
passwd - the login Password.public java.lang.String getPassword()
public void setPrompt(java.lang.String prompt)
prompt - the command prompt.public java.lang.String getPrompt()
public java.lang.Object clone()
public java.lang.String getLoginPrompt()
public void setLoginPrompt(java.lang.String loginPrompt)
loginPrompt - login Prompt as a String.public java.lang.String getPasswdPrompt()
public void setPasswdPrompt(java.lang.String passwdPrompt)
passwdPrompt - passwordPrompt as a String.public int getLoginTimeout()
public void setLoginTimeout(int timeout)
timeout - the time-out in milliseconds.public java.lang.String getInitialMessage()
public void setInitialMessage(java.lang.String message)
message - the login Message from the device.public boolean isPerformPing()
boolean value to indicate if ping needs to be done.public void setPerformPing(boolean flag)
flag - a boolean value to enable/disable ping.public void setTerminalType(java.lang.String type)
type - the terminal typegetTerminalType()public java.lang.String getTerminalType()
public void setProperties(java.util.Properties properties)
props - the property object which contains the list of properties.public java.util.Properties getProperties()
public void setConnectionHandler(ConnectionHandler ch)
ch - the ConnectionHandler objectpublic ConnectionHandler getConnectionHandler()
ConnectionHandler value
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||