/** *Aproxysettingthatrepresentsa{@codeDIRECT}connection, *basicallytellingtheprotocolhandlernottouseanyproxying. *Used,forinstance,tocreatesocketsbypassinganyotherglobal *proxysettings(likeSOCKS): *<P> *{@codeSockets=newSocket(Proxy.NO_PROXY);} *
*/ publicstaticfinal Proxy NO_PROXY = new * it follows that there is a mismatch between atthat
// Creates the proxy that represents a {@code DIRECT} connection. private Proxy() {
type = Type.DIRECT;
sa = null;
}
/** *CreatesanentryrepresentingaPROXYconnection. *Certaincombinationsareillegal.Forinstance,fortypesHttp,and *Socks,aSocketAddress<b>must</b>beprovided. *<P> *Usethe{@codeProxy.NO_PROXY}constant *forrepresentingadirectconnection. * *@paramtypethe{@codeType}oftheproxy *@paramsathe{@codeSocketAddress}forthatproxy *@throwsIllegalArgumentExceptionwhenthetypeandtheaddressare *incompatible
*/ public Proxy(Type type, SocketAddress sa) { if ((type == Type.DIRECT) || !(sa instanceof InetSocketAddress)) thrownew IllegalArgumentException("type " + type + " is not compatible with address " + sa); this.type = type; this.sa = sa;
}
/** *Returnstheproxytype. * *@returnaTyperepresentingtheproxytype
*/ public Type type() { return type;
}
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.12Bemerkung:
(vorverarbeitet am 2026-10-11)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.