|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface HttpProtocolHandler
The HttpProtocolHandler handles the communications for the HTTP protocol.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.foxsmart.ic.net.ProtocolHandler |
|---|
ProtocolHandler.Protocol |
| Field Summary |
|---|
| Fields inherited from interface com.foxsmart.ic.net.ProtocolHandler |
|---|
CR, DEFAULT_PROTOCOL_TIMEOUT_SECONDS |
| Method Summary | |
|---|---|
void |
connect(java.lang.String hostname,
java.lang.Integer port,
java.lang.String username,
java.lang.String password,
java.lang.Integer timeout)
Connects to the hostname at the specified port number and authenticates with the remote device. |
void |
disconnect()
Disconnects the socket connection. |
java.lang.Integer |
getDefaultProtocolTimeout()
Gets the default operation timeout value. |
boolean |
getPasswordUsed()
Gets whether the password was used for authentication. |
boolean |
getUsernameUsed()
Gets whether the username was used for authentication. |
boolean |
isConnected()
Returns true if the client is currently connected to a server. |
java.lang.String |
sendCommandWithResults(java.lang.String command)
Sends a command to the router and returns the results of the command being executed. |
java.lang.String |
sendConfigCommandWithResults(java.lang.String command,
boolean parent)
Sends a configuration command to the router and returns the results of the command being executed. |
void |
setDefaultProtocolTimeout(java.lang.Integer timeout)
Modifies the default operation protocol timeout value. |
void |
setPasswordUsed(boolean passwordUsed)
Sets whether the password was used for authentication. |
void |
setUsernameUsed(boolean usernameUsed)
Sets whether the username was used for authentication. |
| Methods inherited from interface com.foxsmart.ic.net.ProtocolHandler |
|---|
getAvailable, getProtocol |
| Method Detail |
|---|
void connect(java.lang.String hostname,
java.lang.Integer port,
java.lang.String username,
java.lang.String password,
java.lang.Integer timeout)
throws java.lang.Exception
hostname - The name of the remote host.port - The port to connect to on the remote host. If null is passed in, a default port will be used.username - The username to connect with. Null should be passed in if no username is required.password - The password to connect with. Null should be passed in if no password is required.timeout - The timeout in seconds. If null is passed in, a default timeout will be used.
AuthenticationFailedException - when a successful connection could not be made
java.io.IOException - if the URL stream could not be opened to the URL
java.net.UnknownServiceException - if the URL protocol does not support input
ThreadTimeoutException - if a timeout occurred while connecting to the router.
java.net.UnknownHostException - If the hostname cannot be resolved.
java.lang.Exception - if any other problems were encountered.boolean isConnected()
void disconnect()
throws java.io.IOException
java.io.IOException - If there is an error closing the socket.void setUsernameUsed(boolean usernameUsed)
usernameUsed - True if the username was used or false if not.boolean getUsernameUsed()
void setPasswordUsed(boolean passwordUsed)
passwordUsed - True if the password was used or false if not.boolean getPasswordUsed()
java.lang.String sendCommandWithResults(java.lang.String command)
throws java.lang.Exception
command - The command to send to the device.
java.io.IOException - if there was a problem sending the command.
java.lang.Exception - if any other problems were encountered.
java.lang.String sendConfigCommandWithResults(java.lang.String command,
boolean parent)
throws java.lang.Exception
command - The command to send to the device.parent - True if the configuration command is a parent element or false if not.
java.lang.Exception - if any problems were encountered.void setDefaultProtocolTimeout(java.lang.Integer timeout)
setDefaultProtocolTimeout in interface ProtocolHandlertimeout - The default timeout value in seconds to wait for the data to be returned. If null is passed, no
timeout will be used. Beware that if an expected match string is not found or if the device doesn't respond, the
expect method will not return.java.lang.Integer getDefaultProtocolTimeout()
getDefaultProtocolTimeout in interface ProtocolHandler
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||