jetty-9 more configuration clean ups
This commit is contained in:
parent
e596d6eef6
commit
35a86c3373
|
@ -9,7 +9,7 @@ public class TestXml
|
|||
System.setProperty("jetty.home","../jetty-distribution/target/distribution");
|
||||
XmlConfiguration.main(new String[]
|
||||
{
|
||||
// "../jetty-jmx/src/main/config/etc/jetty-jmx.xml",
|
||||
"../jetty-jmx/src/main/config/etc/jetty-jmx.xml",
|
||||
"../jetty-server/src/main/config/etc/jetty.xml",
|
||||
"../jetty-spdy/spdy-jetty-http-webapp/src/main/config/etc/jetty-spdy.xml"
|
||||
}
|
||||
|
|
|
@ -843,6 +843,7 @@ public class ServerHTTPSPDYTest extends AbstractHTTPSPDYTest
|
|||
public void handle(String target, Request request, HttpServletRequest httpRequest, HttpServletResponse httpResponse)
|
||||
throws IOException, ServletException
|
||||
{
|
||||
// TODO suppress stack from test log
|
||||
throw new NullPointerException("thrown_explicitly_by_the_test");
|
||||
}
|
||||
}), null);
|
||||
|
|
|
@ -26,12 +26,16 @@ import java.util.List;
|
|||
import org.eclipse.jetty.io.Connection;
|
||||
import org.eclipse.jetty.io.EndPoint;
|
||||
import org.eclipse.jetty.io.ssl.SslConnection.DecryptedEndPoint;
|
||||
import org.eclipse.jetty.npn.NextProtoNego;
|
||||
import org.eclipse.jetty.server.AbstractConnectionFactory;
|
||||
import org.eclipse.jetty.server.Connector;
|
||||
import org.eclipse.jetty.util.annotation.Name;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
|
||||
public class NPNServerConnectionFactory extends AbstractConnectionFactory
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(NPNServerConnectionFactory.class);
|
||||
private final List<String> _protocols;
|
||||
private String _defaultProtocol;
|
||||
|
||||
|
@ -43,6 +47,20 @@ public class NPNServerConnectionFactory extends AbstractConnectionFactory
|
|||
{
|
||||
super("npn");
|
||||
_protocols=Arrays.asList(protocols);
|
||||
|
||||
try
|
||||
{
|
||||
if (NextProtoNego.class.getClassLoader()!=null)
|
||||
{
|
||||
LOG.warn("NextProtoNego not from bootloader classloader: "+NextProtoNego.class.getClassLoader());
|
||||
throw new IllegalStateException("NextProtoNego not on bootloader");
|
||||
}
|
||||
}
|
||||
catch(Throwable th)
|
||||
{
|
||||
LOG.warn("NextProtoNego not available: "+th);
|
||||
throw new IllegalStateException("NextProtoNego not available",th);
|
||||
}
|
||||
}
|
||||
|
||||
public String getDefaultProtocol()
|
||||
|
|
|
@ -51,6 +51,7 @@ public class NextProtoNegoServerConnection extends AbstractConnection implements
|
|||
this.protocols = protocols;
|
||||
this.defaultProtocol=defaultProtocol;
|
||||
engine = endPoint.getSslConnection().getSSLEngine();
|
||||
|
||||
NextProtoNego.put(engine,this);
|
||||
}
|
||||
|
||||
|
|
|
@ -298,10 +298,10 @@ public class XmlConfiguration
|
|||
else
|
||||
{
|
||||
String namedAttribute = node.getAttribute("name");
|
||||
Object value=value(obj,(XmlParser.Node)o);
|
||||
if (namedAttribute != null)
|
||||
namedArgMap.put(namedAttribute,value(obj,(XmlParser.Node)o));
|
||||
|
||||
arguments.add(value(obj, (XmlParser.Node)o));
|
||||
namedArgMap.put(namedAttribute,value);
|
||||
arguments.add(value);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -745,10 +745,10 @@ public class XmlConfiguration
|
|||
continue;
|
||||
|
||||
String namedAttribute = argNode.getAttribute("name");
|
||||
Object value=value(obj,(XmlParser.Node)o);
|
||||
if (namedAttribute != null)
|
||||
namedArgMap.put(namedAttribute,value(obj,(XmlParser.Node)o));
|
||||
|
||||
arguments.add(value(obj,(XmlParser.Node)o));
|
||||
namedArgMap.put(namedAttribute,value);
|
||||
arguments.add(value);
|
||||
}
|
||||
|
||||
if (LOG.isDebugEnabled())
|
||||
|
@ -772,6 +772,7 @@ public class XmlConfiguration
|
|||
{
|
||||
throw new IllegalStateException("No suitable constructor: " + node + " on " + obj);
|
||||
}
|
||||
|
||||
configure(n,node,argIndex);
|
||||
return n;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue