[jbossws-commits] JBossWS SVN: r8398 - framework/trunk/src/main/java/org/jboss/wsf/framework/deployment.
jbossws-commits at lists.jboss.org
jbossws-commits at lists.jboss.org
Wed Oct 8 10:30:37 EDT 2008
Author: richard.opalka at jboss.com
Date: 2008-10-08 10:30:37 -0400 (Wed, 08 Oct 2008)
New Revision: 8398
Modified:
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/AbstractAspectizedEndpointServlet.java
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/AbstractEndpointServlet.java
Log:
[JBWS-2246][JBWS-2264][JBAS-5732] refactoring
Modified: framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/AbstractAspectizedEndpointServlet.java
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/AbstractAspectizedEndpointServlet.java 2008-10-08 14:27:31 UTC (rev 8397)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/AbstractAspectizedEndpointServlet.java 2008-10-08 14:30:37 UTC (rev 8398)
@@ -24,6 +24,7 @@
import org.jboss.wsf.spi.DeploymentAspectManagerLocator;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.DeploymentAspectManager;
+import org.jboss.wsf.spi.deployment.Endpoint.EndpointState;
/**
* A cross stack aspectized webservice servlet that is installed for every web service endpoint on AS 5.x series
@@ -87,8 +88,32 @@
super.stopAspectManager();
}
}
-
+
/**
+ * Fires endpoint start event
+ */
+ @Override
+ protected final void startEndpoint()
+ {
+ if (this.endpoint.getState() == EndpointState.CREATED)
+ {
+ this.endpoint.getLifecycleHandler().start(this.endpoint);
+ }
+ }
+
+ /**
+ * Fires endpoint stop event
+ */
+ @Override
+ protected final void stopEndpoint()
+ {
+ if (this.endpoint.getState() == EndpointState.STARTED)
+ {
+ this.endpoint.getLifecycleHandler().stop(this.endpoint);
+ }
+ }
+
+ /**
* Asserts this object correct state
*/
private void assertCorrectState()
Modified: framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/AbstractEndpointServlet.java
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/AbstractEndpointServlet.java 2008-10-08 14:27:31 UTC (rev 8397)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/AbstractEndpointServlet.java 2008-10-08 14:30:37 UTC (rev 8398)
@@ -119,7 +119,7 @@
}
/**
- * Template method
+ * Template method for initializing aspect manager
*/
protected void initAspectManager()
{
@@ -127,7 +127,7 @@
}
/**
- * Template method
+ * Template method for starting aspect manager
*/
protected void startAspectManager()
{
@@ -135,7 +135,7 @@
}
/**
- * Template method
+ * Template method for stopping aspect manager
*/
protected void stopAspectManager()
{
@@ -143,6 +143,22 @@
}
/**
+ * Template method to fire endpoint start event
+ */
+ protected void startEndpoint()
+ {
+ // does nothing (because of BC)
+ }
+
+ /**
+ * Template method to fire endpoint stop event
+ */
+ protected void stopEndpoint()
+ {
+ // does nothing (because of BC)
+ }
+
+ /**
* Abstract method that must be overriden by each stack servlet endpoint
* @param servletContext servlet context
* @param servletName servlet name
@@ -205,20 +221,4 @@
}
}
- private void startEndpoint()
- {
- if (this.endpoint.getState() == EndpointState.CREATED)
- {
- this.endpoint.getLifecycleHandler().start(this.endpoint);
- }
- }
-
- private void stopEndpoint()
- {
- if (this.endpoint.getState() == EndpointState.STARTED)
- {
- this.endpoint.getLifecycleHandler().stop(this.endpoint);
- }
- }
-
}
More information about the jbossws-commits
mailing list