diff --git a/jetty-distribution/src/main/resources/start.ini b/jetty-distribution/src/main/resources/start.ini index 561336af6ed..ea608e9aefb 100644 --- a/jetty-distribution/src/main/resources/start.ini +++ b/jetty-distribution/src/main/resources/start.ini @@ -117,7 +117,11 @@ etc/jetty-https.xml # also provides HTTPS. # The NPN jar must be separately downloaded from # http://repo1.maven.org/maven2/org/mortbay/jetty/npn/npn-boot/1.1.0.v20120525/ -# Must also enable --exec or use --exec-print (see above) +# Must also enable --exec or use --exec-print (see above) or +# add -Xbootclasspath/p:lib/npn-boot-1.1.0.v20120525.jar to +# the java commandline you use to start jetty. +# Make sure that you either reconfigure ports or comment +# jetty-http.xml/jetty-https.xml to avoid port conflicts. #----------------------------------------------------------- # OPTIONS=spdy # -Xbootclasspath/p:lib/npn-boot-1.1.0.v20120525.jar diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/AbstractConnector.java b/jetty-server/src/main/java/org/eclipse/jetty/server/AbstractConnector.java index 5478f14599e..a07374b29f1 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/AbstractConnector.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/AbstractConnector.java @@ -124,8 +124,6 @@ import org.eclipse.jetty.util.thread.TimerScheduler; *
* Extends the {@link AbstractConnector} support for the {@link NetworkConnector} interface.
*/
+@ManagedObject("AbstractNetworkConnector")
public abstract class AbstractNetworkConnector extends AbstractConnector implements NetworkConnector
{
+
private volatile String _host;
private volatile int _port = 0;
@@ -46,6 +50,7 @@ public abstract class AbstractNetworkConnector extends AbstractConnector impleme
}
@Override
+ @ManagedAttribute("Host this connector binds to")
public String getHost()
{
return _host;
@@ -57,6 +62,7 @@ public abstract class AbstractNetworkConnector extends AbstractConnector impleme
}
@Override
+ @ManagedAttribute("Port this connector listens on")
public int getPort()
{
return _port;
diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/ServerConnector.java b/jetty-server/src/main/java/org/eclipse/jetty/server/ServerConnector.java
index 53a7b876137..42483faa212 100644
--- a/jetty-server/src/main/java/org/eclipse/jetty/server/ServerConnector.java
+++ b/jetty-server/src/main/java/org/eclipse/jetty/server/ServerConnector.java
@@ -38,6 +38,7 @@ import org.eclipse.jetty.io.SelectChannelEndPoint;
import org.eclipse.jetty.io.SelectorManager;
import org.eclipse.jetty.io.SelectorManager.ManagedSelector;
import org.eclipse.jetty.util.Callback;
+import org.eclipse.jetty.util.annotation.ManagedAttribute;
import org.eclipse.jetty.util.annotation.ManagedObject;
import org.eclipse.jetty.util.annotation.Name;
import org.eclipse.jetty.util.ssl.SslContextFactory;
@@ -282,6 +283,7 @@ public class ServerConnector extends AbstractNetworkConnector
}
@Override
+ @ManagedAttribute("local port")
public int getLocalPort()
{
return _localPort;
@@ -296,6 +298,7 @@ public class ServerConnector extends AbstractNetworkConnector
* @return the linger time
* @see Socket#getSoLinger()
*/
+ @ManagedAttribute("linger time")
public int getLingerTime()
{
return _lingerTime;
@@ -313,6 +316,7 @@ public class ServerConnector extends AbstractNetworkConnector
/**
* @return the accept queue size
*/
+ @ManagedAttribute("Accept Queue size")
public int getAcceptQueueSize()
{
return _acceptQueueSize;
diff --git a/jetty-spdy/spdy-server/src/main/java/org/eclipse/jetty/spdy/server/SPDYServerConnectionFactory.java b/jetty-spdy/spdy-server/src/main/java/org/eclipse/jetty/spdy/server/SPDYServerConnectionFactory.java
index 9e6e32ee79e..5c909117df0 100644
--- a/jetty-spdy/spdy-server/src/main/java/org/eclipse/jetty/spdy/server/SPDYServerConnectionFactory.java
+++ b/jetty-spdy/spdy-server/src/main/java/org/eclipse/jetty/spdy/server/SPDYServerConnectionFactory.java
@@ -38,7 +38,10 @@ import org.eclipse.jetty.spdy.client.FlowControlStrategyFactory;
import org.eclipse.jetty.spdy.client.SPDYConnection;
import org.eclipse.jetty.spdy.generator.Generator;
import org.eclipse.jetty.spdy.parser.Parser;
+import org.eclipse.jetty.util.annotation.ManagedAttribute;
+import org.eclipse.jetty.util.annotation.ManagedObject;
+@ManagedObject("SPDY Server Connection Factory")
public class SPDYServerConnectionFactory extends AbstractConnectionFactory
{
// This method is placed here so as to provide a check for NPN before attempting to load any
@@ -75,6 +78,7 @@ public class SPDYServerConnectionFactory extends AbstractConnectionFactory
setInitialWindowSize(65536);
}
+ @ManagedAttribute("SPDY version")
public short getVersion()
{
return version;
@@ -118,6 +122,7 @@ public class SPDYServerConnectionFactory extends AbstractConnectionFactory
return listener;
}
+ @ManagedAttribute("Initial Window Size")
public int getInitialWindowSize()
{
return initialWindowSize;
@@ -155,7 +160,7 @@ public class SPDYServerConnectionFactory extends AbstractConnectionFactory
super.doStop();
}
- protected Collection