com.lutris.applet
Class LBSConnection
java.lang.Object
com.lutris.applet.LBSConnection
public class LBSConnection
- extends java.lang.Object
This file is the counterpart to
com.lutris.appserver.server.httpPresentation.AppletUtils. It is meant
to be added to the applet's jar file or classes directory. The methods
are split into two files so that the applet does not need to include
any com.lutris.appserver.server.* classes.
A dynamicly generated page contained the tag that lead to
the applet calling this function. That tag was created by
com.lutris.appserver.server.httpPresentation.AppletUtils.createAppletTag.
When the applet wants to establish a connection back to the
Multiserver, simply call the contactServer() and the extra
initialization parameters added by createAppletTag() will be used to
contact the server. Specifically, the request will match the user's
current session.
- See Also:
AppletUtils
Method Summary |
static java.net.URLConnection |
contactServer(java.applet.Applet applet)
Use the extra initialization parameters added to the APPLET tag
by AppletUtils.createAppletTag() to open a connection back to
the Multiserver, using the same session as the one used
to get the HTML page that contained the APPLET tag. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
nameParamName
public static final java.lang.String nameParamName
- See Also:
- Constant Field Values
valueParamName
public static final java.lang.String valueParamName
- See Also:
- Constant Field Values
targetParamName
public static final java.lang.String targetParamName
- See Also:
- Constant Field Values
contactServer
public static java.net.URLConnection contactServer(java.applet.Applet applet)
- Use the extra initialization parameters added to the APPLET tag
by AppletUtils.createAppletTag() to open a connection back to
the Multiserver, using the same session as the one used
to get the HTML page that contained the APPLET tag.
The resulting URLConnection is ready to have
connect()
called on it. You may initialize more
options if you wish, for example setDoOutput()
or
setRequestMethod()
before calling connect()
.
The resulting URLConnection may also be a HttpURLConnection, but
this is not guarenteed. In the JDK on Windows and Solaris it is,
but when running in Netscape Communicator as an applet, it is not.
So to be safe, we return the more generic class. The main
functionality missing is the ability to set the request method.
However, if you call setDoOutput(true)
in Communicator,
it will issue a POST request.
- Parameters:
applet
- The applet that is calling this method.
- Returns:
- A connection back to the server, or null if an error occured.