All Packages Class Hierarchy This Package Previous Next Index
Class sics.agentbase.http.httpServer
java.lang.Object
|
+----sics.agentbase.net.InternetServer
|
+----sics.agentbase.http.httpServer
- public class httpServer
- extends InternetServer
- implements ProtocolHandler
httpServer implements a HTTP server that parses HTTP
requests and delivers messages.
-
httpServer()
- Starts up a HTTP server on the default port.
Deprecated.
-
httpServer(boolean)
- Starts up a HTTP server on any available port and registers as a
protocol handler if the register flag is true.
-
httpServer(int)
- Starts up a HTTP server on a specified port.
Deprecated.
-
httpServer(int, boolean)
- Starts up a HTTP server on a specified port and registers as a
protocol handler if the register flag is true.
-
httpServer(String, int)
- Starts up a HTTP server on a specified port and host.
Deprecated.
-
httpServer(String, int, boolean)
- Starts up a HTTP server on a specified port and registers as a
protocol handler if the register flag is true.
-
getScheme()
- Returns the scheme of this protocol (= "http").
-
getURL(String)
- Returns the full HTTP URL of a local path (object name).
-
handleConnection(Socket)
- Handles a HTTP connection.
-
main(String[])
-
-
supportType(String)
- Returns true if the specified mime type is supported.
httpServer
public httpServer() throws IOException
- Note: httpServer() is deprecated.
Use httpServer(boolean doRegister) instead!
- Starts up a HTTP server on the default port.
httpServer
public httpServer(int Port) throws IOException
- Note: httpServer() is deprecated.
Use httpServer(int Port, boolean doRegister) instead!
- Starts up a HTTP server on a specified port.
- Parameters:
- Port - the port that this server opens and listens to.
httpServer
public httpServer(String host,
int Port) throws IOException
- Note: httpServer() is deprecated.
Use httpServer(String Host, int Port, boolean doRegister) instead!
- Starts up a HTTP server on a specified port and host.
- Parameters:
- host - the host that this server resides at.
- Port - the port that this server opens and listens to.
httpServer
public httpServer(boolean doRegister) throws IOException
- Starts up a HTTP server on any available port and registers as a
protocol handler if the register flag is true.
- Parameters:
- doRegister - specifies if the server should register as a
protocol handler or not.
- See Also:
- addProtocolHandler
httpServer
public httpServer(int Port,
boolean doRegister) throws IOException
- Starts up a HTTP server on a specified port and registers as a
protocol handler if the register flag is true.
- Parameters:
- Port - the port that this server opens and listens to.
- doRegister - specifies if the server should register as a
protocol handler or not.
httpServer
public httpServer(String host,
int Port,
boolean doRegister) throws IOException
- Starts up a HTTP server on a specified port and registers as a
protocol handler if the register flag is true.
- Parameters:
- host - the full host name of the host that this server resides at.
- Port - the port that this server opens and listens to.
- doRegister - specifies if the server should register as a
protocol handler or not.
getScheme
public String getScheme()
- Returns the scheme of this protocol (= "http").
supportType
public boolean supportType(String mimetype)
- Returns true if the specified mime type is supported.
getURL
public URL getURL(String name)
- Returns the full HTTP URL of a local path (object name).
- Parameters:
- name - the path (or object name).
- Returns:
- the complete URL.
handleConnection
protected void handleConnection(Socket connection)
- Handles a HTTP connection. Creates a HTTP Message from the
connection and delivers the message using CentralFactory.
- Parameters:
- connection - the HTTP request connection.
- Overrides:
- handleConnection in class InternetServer
main
public static void main(String args[])
All Packages Class Hierarchy This Package Previous Next Index