com.monkeycoder.monkeynetwork
Class NetworkProtocol

java.lang.Object
  extended by com.monkeycoder.monkeynetwork.NetworkProtocol

public class NetworkProtocol
extends java.lang.Object

This class contains definitions of protocols supported by MonkeyNetwork.

Author:
David Stephens

Field Summary
static int PROTOCOL_FTP
          File Transfer Protocol.
static int PROTOCOL_HTTP
          Hypertext Transport Protocol 1.1.
static int PROTOCOL_NONE
          Unknown or No protocol.
static java.lang.String[] protocolFullName
          Full name of each protocol.
static java.lang.String[] protocolName
          Textual representation of each protocol.
static int[] protocolPort
          Default access port for this protocol.
static java.lang.String[] protocolRfc
          RFC of each protocol for informational purposes.
static java.lang.String[] protocolUrl
          Start of a URL using each protocol.
 
Method Summary
static int getProtocol(java.lang.String inProtocolUrl)
          Get the protocol number based on a pre-trimmed protocol portion of a URL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROTOCOL_NONE

public static final int PROTOCOL_NONE
Unknown or No protocol.

See Also:
Constant Field Values

PROTOCOL_HTTP

public static final int PROTOCOL_HTTP
Hypertext Transport Protocol 1.1.

See Also:
Constant Field Values

PROTOCOL_FTP

public static final int PROTOCOL_FTP
File Transfer Protocol.

See Also:
Constant Field Values

protocolName

public static final java.lang.String[] protocolName
Textual representation of each protocol.


protocolUrl

public static final java.lang.String[] protocolUrl
Start of a URL using each protocol.


protocolPort

public static final int[] protocolPort
Default access port for this protocol.


protocolFullName

public static final java.lang.String[] protocolFullName
Full name of each protocol.


protocolRfc

public static final java.lang.String[] protocolRfc
RFC of each protocol for informational purposes.

Method Detail

getProtocol

public static int getProtocol(java.lang.String inProtocolUrl)
Get the protocol number based on a pre-trimmed protocol portion of a URL.

Parameters:
inProtocolUrl - A pre-trimmed protocol portion of a URL.
Returns:
The protocol number or PROTOCOL_NONE if no determination could be made.