Author: thomas.diesler(a)jboss.com
Date: 2007-06-28 07:16:18 -0400 (Thu, 28 Jun 2007)
New Revision: 3754
Modified:
branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicEndpoint.java
Log:
assertEndpointSetterAccess
Modified:
branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicEndpoint.java
===================================================================
---
branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicEndpoint.java 2007-06-28
08:54:40 UTC (rev 3753)
+++
branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicEndpoint.java 2007-06-28
11:16:18 UTC (rev 3754)
@@ -66,6 +66,7 @@
public void setService(Service service)
{
+ assertEndpointSetterAccess();
this.service = service;
}
@@ -76,6 +77,7 @@
public void setTargetBeanName(String targetBean)
{
+ assertEndpointSetterAccess();
this.targetBean = targetBean;
}
@@ -99,6 +101,7 @@
}
return beanClass;
}
+
public ObjectName getName()
{
return name;
@@ -106,6 +109,7 @@
public void setName(ObjectName name)
{
+ assertEndpointSetterAccess();
this.name = name;
}
@@ -116,6 +120,7 @@
public void setShortName(String shortName)
{
+ assertEndpointSetterAccess();
this.shortName = shortName;
}
@@ -126,6 +131,7 @@
public void setURLPattern(String urlPattern)
{
+ assertEndpointSetterAccess();
this.urlPattern = urlPattern;
}
@@ -146,6 +152,7 @@
public void setRequestHandler(RequestHandler handler)
{
+ assertEndpointSetterAccess();
this.requestHandler = handler;
}
@@ -156,6 +163,7 @@
public void setLifecycleHandler(LifecycleHandler handler)
{
+ assertEndpointSetterAccess();
this.lifecycleHandler = handler;
}
@@ -166,6 +174,7 @@
public void setInvocationHandler(InvocationHandler handler)
{
+ assertEndpointSetterAccess();
this.invocationHandler = handler;
}
@@ -176,6 +185,7 @@
public void setJAXBHandler(JAXBHandler jaxbHandler)
{
+ assertEndpointSetterAccess();
this.jaxbHandler = jaxbHandler;
}
@@ -221,8 +231,15 @@
public void setEndpointMetrics(EndpointMetrics metrics)
{
+ assertEndpointSetterAccess();
metrics.setEndpoint(this);
this.metrics = metrics;
}
+
+ private void assertEndpointSetterAccess()
+ {
+ if (state == EndpointState.STARTED)
+ throw new IllegalStateException("Cannot modify endpoint properties in
state: " + state);
+ }
}
Show replies by date