com.solarmetric.remote
Class HTTPTransport
java.lang.Object
|
+--com.solarmetric.remote.HTTPTransport
- All Implemented Interfaces:
- com.solarmetric.util.Closeable, Transport
- public class HTTPTransport
- extends Object
- implements Transport
HTTP transport layer. The server is a servlet that can be installed
into any compliant servlet container.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HTTPTransport
public HTTPTransport()
getURL
public String getURL()
- The URL used to contact the remote server.
setURL
public void setURL(String url)
- The URL used to contact the remote server.
getServer
public com.solarmetric.remote.Server getServer()
throws Exception
- Description copied from interface:
Transport
- Return a transport server to listen for client connections.
Only one server will ever be requested per transport instance.
- Specified by:
getServer
in interface Transport
getClientChannel
public com.solarmetric.remote.Channel getClientChannel()
throws Exception
- Description copied from interface:
Transport
- Return a transport client channel to communicate with a remote
server.
- Specified by:
getClientChannel
in interface Transport
getServletChannel
public com.solarmetric.remote.Channel getServletChannel(HttpServletRequest req,
HttpServletResponse resp)
- Channel built around an
HttpServletRequest
and
HttpServletResponse
. In your servlet's
HttpServlet#doPost
method, use this method to retrieve
a channel to pass to the CommandIO.execute(com.solarmetric.remote.Transport.Channel)
method. Then close
the channel.
close
public void close()
- Specified by:
close
in interface com.solarmetric.util.Closeable
Copyright 2001,2002 SolarMetric, Inc. All Rights Reserved.