com.foxsmart.ic.net
Interface ProtocolHandler

All Known Subinterfaces:
CliProtocolHandler, HttpProtocolHandler
All Known Implementing Classes:
AbstractCliProtocolHandler, CommonsTelnetProtocolHandler, DefaultHttpProtocolHandler, MindTermSshProtocolHandler, MindTermSshProtocolHandlerImpl, PlinkSshProtocolHandler

public interface ProtocolHandler

The ProtocolHandler is a class that knows how to communicate using a specific protocol.


Nested Class Summary
static class ProtocolHandler.Protocol
          The supported protocols.
 
Field Summary
static java.lang.String CR
          A carriage return character.
static int DEFAULT_PROTOCOL_TIMEOUT_SECONDS
          The default operation timeout in seconds.
 
Method Summary
 boolean getAvailable()
          Determines if the protocol handler is available for usage.
 java.lang.Integer getDefaultProtocolTimeout()
          Gets the default operation timeout value.
 ProtocolHandler.Protocol getProtocol()
          Gets the protocol that this handler supports.
 void setDefaultProtocolTimeout(java.lang.Integer timeout)
          Modifies the default operation protocol timeout value.
 

Field Detail

DEFAULT_PROTOCOL_TIMEOUT_SECONDS

static final int DEFAULT_PROTOCOL_TIMEOUT_SECONDS
The default operation timeout in seconds.

See Also:
Constant Field Values

CR

static final java.lang.String CR
A carriage return character.

See Also:
Constant Field Values
Method Detail

setDefaultProtocolTimeout

void setDefaultProtocolTimeout(java.lang.Integer timeout)
Modifies the default operation protocol timeout value.

Parameters:
timeout - 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.

getDefaultProtocolTimeout

java.lang.Integer getDefaultProtocolTimeout()
Gets the default operation timeout value.

Returns:
the timeout in seconds.

getAvailable

boolean getAvailable()
Determines if the protocol handler is available for usage.

Returns:
True if available or false if not.

getProtocol

ProtocolHandler.Protocol getProtocol()
Gets the protocol that this handler supports.

Returns:
the supported protocol.


Copyright © 2005-2008 Fox Smart, Inc. All Rights Reserved.