charite.christo
Class Web
java.lang.Object
charite.christo.Web
- All Implemented Interfaces:
- ChRunnable
public class Web
- extends java.lang.Object
- implements ChRunnable
HELP
Internet and Web-proxy
In some institutions all Internet connections are going through a Web proxy (see WIKI:Proxy_server).
If the proxy is not set correctly, STRAP is unable to download files from the Web.
The proxy cannot be set in the running application.
The way how the proxy is set depends on whether the application is
started via WIKI:Webstart (See WIKI:JNLP) or started directly.
Webstart
In Windows or Linux there is a program called Java control panel which allows to set the proxy (Button "Network settings"):
STRING:charite.christo.ChUtils#fileJcontrol() located in
STRING:ChUtils#dirJavaws().
Under Macintosh, however, the system wide proxy setting is also used in Java.
Direct start without Webstart
The proxy is specified with command line arguments. Example:
java -Dhttp.proxyHost=realproxy.charite.de -Dhttp.proxyPort=888 ...
If there are addresses that should bypass the proxy use vertical bar separated list of hosts as in the following example:
.... -Dhttp.nonProxyHosts="localhost|host.mydomain.com" ...
Testing the Proxy settings
Use the item BUTTON:charite.christo.ChUtils#buttn(BUT_TEST_PROXY)!
In the menu "Preferences" is.
Further reading http://java.sun.com/javase/6/docs/technotes/guides/net/proxies.html
Fields inherited from interface charite.christo.ChRunnable |
APPEND, COLUMN_TITLE, DOWNLOAD_FINISHED, GET_PANEL, ICON, INTERPRET_LINE, IS_DRAG4XY, ITEM_TEXT, MODIFY_RENDERER_COMPONENT, PROGRESS, REPAINT_CURSOR, SAY_DOWNLOADING, SET_ICON_IMAGE, SET_TREE_VALUE, SHOW_IN_FRAME, TAB_TEXT, TIP_TEXT |
Method Summary |
static void |
autoProbeProxy()
|
static void |
checkForNewVersion(java.lang.String title)
|
static BA |
getServerResponse(long options,
java.lang.String url,
java.lang.Object[][] variables)
|
static java.io.InputStream |
getServerResponseAsStream(long options,
java.lang.String url,
BA httpData)
|
static java.io.InputStream |
getServerResponseAsStream(long options,
java.lang.String url,
java.lang.Object[][] data)
|
static void |
insertBaseTag(java.net.URL url,
java.io.File fDest,
BA html)
|
static boolean |
localhost_sendData(java.lang.String url,
BA log)
|
static java.net.Socket |
newSocket(java.lang.String host)
|
static javax.swing.JComponent |
pnlProxyInfo()
|
static int |
proxyPort(java.lang.Object text,
int from0,
int to0)
|
java.lang.Object |
run(java.lang.String id,
java.lang.Object arg)
|
static void |
runAfterProbeProxy(long options,
java.lang.Runnable r,
int maxWaitMS)
|
static boolean |
sendDataToPort(long options,
int port,
java.lang.CharSequence data,
java.lang.String wordUnderMouse)
|
static void |
showProxyInfo()
|
static void |
startJnlp(java.net.URL url,
ChTextReplacement rplc)
|
static ChTextView |
tfAutoprobeProxy()
|
static java.lang.Thread |
thread_autoProbeProxy()
|
static java.lang.Thread |
thread_sendDataToPort(long options,
int port,
java.lang.CharSequence data,
java.lang.String wordUnderMouse)
|
static java.lang.Thread |
thread_startJnlp(java.net.URL url,
ChTextReplacement rplc)
|
static boolean |
uploadPermission(long frameOpts,
BA httpData,
java.lang.String url)
|
static java.net.URL[] |
urls(java.lang.Object urlBase,
java.lang.String files)
|
static java.net.URL[] |
urls(java.lang.Object urlBase,
java.lang.String[] tokens)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SHOW_EXCEPTION
public static final long SHOW_EXCEPTION
- See Also:
- Constant Field Values
MAP_VIA_PORT_MSG
public static final java.util.Map<java.lang.String,java.lang.String> MAP_VIA_PORT_MSG
getServerResponse
public static BA getServerResponse(long options,
java.lang.String url,
java.lang.Object[][] variables)
getServerResponseAsStream
public static java.io.InputStream getServerResponseAsStream(long options,
java.lang.String url,
java.lang.Object[][] data)
uploadPermission
public static boolean uploadPermission(long frameOpts,
BA httpData,
java.lang.String url)
getServerResponseAsStream
public static java.io.InputStream getServerResponseAsStream(long options,
java.lang.String url,
BA httpData)
thread_sendDataToPort
public static java.lang.Thread thread_sendDataToPort(long options,
int port,
java.lang.CharSequence data,
java.lang.String wordUnderMouse)
sendDataToPort
public static boolean sendDataToPort(long options,
int port,
java.lang.CharSequence data,
java.lang.String wordUnderMouse)
localhost_sendData
public static boolean localhost_sendData(java.lang.String url,
BA log)
urls
public static java.net.URL[] urls(java.lang.Object urlBase,
java.lang.String files)
urls
public static java.net.URL[] urls(java.lang.Object urlBase,
java.lang.String[] tokens)
insertBaseTag
public static void insertBaseTag(java.net.URL url,
java.io.File fDest,
BA html)
run
public java.lang.Object run(java.lang.String id,
java.lang.Object arg)
- Specified by:
run
in interface ChRunnable
checkForNewVersion
public static void checkForNewVersion(java.lang.String title)
proxyPort
public static int proxyPort(java.lang.Object text,
int from0,
int to0)
thread_startJnlp
public static java.lang.Thread thread_startJnlp(java.net.URL url,
ChTextReplacement rplc)
tfAutoprobeProxy
public static final ChTextView tfAutoprobeProxy()
thread_autoProbeProxy
public static final java.lang.Thread thread_autoProbeProxy()
runAfterProbeProxy
public static void runAfterProbeProxy(long options,
java.lang.Runnable r,
int maxWaitMS)
autoProbeProxy
public static final void autoProbeProxy()
showProxyInfo
public static void showProxyInfo()
pnlProxyInfo
public static javax.swing.JComponent pnlProxyInfo()
startJnlp
public static void startJnlp(java.net.URL url,
ChTextReplacement rplc)
throws java.io.IOException
- Throws:
java.io.IOException
newSocket
public static java.net.Socket newSocket(java.lang.String host)
throws java.io.IOException
- Throws:
java.io.IOException
'The most important classes are StrapAlign, Protein and StrapEvent.'