org.restlet.gwt.data
Class Protocol

java.lang.Object
  extended by org.restlet.gwt.data.Metadata
      extended by org.restlet.gwt.data.Protocol

public final class Protocol
extends Metadata

Protocol used by client and server connectors. Connectors enable the communication between components by implementing standard protocols.

Author:
Jerome Louvel

Field Summary
static Protocol ALL
          All protocols wildcard.
static Protocol FILE
          FILE is a standard scheme to access to representations stored in the file system (locally most of the time).
static Protocol FTP
          FTP protocol.
static Protocol HTTP
          HTTP protocol.
static Protocol HTTPS
          HTTPS protocol (via SSL socket).
static int UNKNOWN_PORT
          Indicates that the port number is undefined.
 
Constructor Summary
Protocol(java.lang.String schemeName)
          Constructor.
Protocol(java.lang.String schemeName, java.lang.String name, java.lang.String description, int defaultPort)
          Constructor.
 
Method Summary
 boolean equals(java.lang.Object object)
          
 int getDefaultPort()
          Returns the default port number.
 java.lang.String getSchemeName()
          Returns the URI scheme name.
 int hashCode()
          
static Protocol valueOf(java.lang.String name)
          Creates the protocol associated to a URI scheme name.
 
Methods inherited from class org.restlet.gwt.data.Metadata
getDescription, getName, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

UNKNOWN_PORT

public static final int UNKNOWN_PORT
Indicates that the port number is undefined.

See Also:
Constant Field Values

ALL

public static final Protocol ALL
All protocols wildcard.


FILE

public static final Protocol FILE
FILE is a standard scheme to access to representations stored in the file system (locally most of the time). Example URI: "file:///D/root/index.html".

In order to work, FILE requires a client connector provided by the core Restlet engine.


FTP

public static final Protocol FTP
FTP protocol.


HTTP

public static final Protocol HTTP
HTTP protocol.


HTTPS

public static final Protocol HTTPS
HTTPS protocol (via SSL socket).

Constructor Detail

Protocol

public Protocol(java.lang.String schemeName)
Constructor.

Parameters:
schemeName - The scheme name.

Protocol

public Protocol(java.lang.String schemeName,
                java.lang.String name,
                java.lang.String description,
                int defaultPort)
Constructor.

Parameters:
schemeName - The scheme name.
name - The unique name.
description - The description.
defaultPort - The default port.
Method Detail

valueOf

public static Protocol valueOf(java.lang.String name)
Creates the protocol associated to a URI scheme name. If an existing constant exists then it is returned, otherwise a new instance is created.

Parameters:
name - The scheme name.
Returns:
The associated protocol.

equals

public boolean equals(java.lang.Object object)

Overrides:
equals in class Metadata

getDefaultPort

public int getDefaultPort()
Returns the default port number.

Returns:
The default port number.

getSchemeName

public java.lang.String getSchemeName()
Returns the URI scheme name.

Returns:
The URI scheme name.

hashCode

public int hashCode()

Overrides:
hashCode in class Metadata


Copyright © 2005-2008 Noelios Technologies.