[jbossws-commits] JBossWS SVN: r4100 - in spi/trunk/src/main/java/org/jboss/wsf/spi: deployment and 3 other directories.
jbossws-commits at lists.jboss.org
jbossws-commits at lists.jboss.org
Thu Aug 2 09:41:02 EDT 2007
Author: thomas.diesler at jboss.com
Date: 2007-08-02 09:41:02 -0400 (Thu, 02 Aug 2007)
New Revision: 4100
Added:
spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/AbstractExtensible.java
spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/Extensible.java
spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/ExtensibleWebServiceContext.java
Removed:
spi/trunk/src/main/java/org/jboss/wsf/spi/Extensible.java
spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/ExtendableWebServiceContext.java
spi/trunk/src/main/java/org/jboss/wsf/spi/management/DefaultEndpointRegistry.java
Modified:
spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/Deployment.java
spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/Endpoint.java
spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/Service.java
spi/trunk/src/main/java/org/jboss/wsf/spi/http/HttpContext.java
spi/trunk/src/main/java/org/jboss/wsf/spi/http/HttpServer.java
spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/WebServiceContextEJB.java
spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/WebServiceContextFactory.java
spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/WebServiceContextJSE.java
Log:
Add AbstractExtensible
Deleted: spi/trunk/src/main/java/org/jboss/wsf/spi/Extensible.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/Extensible.java 2007-08-02 13:36:49 UTC (rev 4099)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/Extensible.java 2007-08-02 13:41:02 UTC (rev 4100)
@@ -1,64 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.spi;
-
-//$Id: Deployment.java 3999 2007-07-26 11:33:20Z thomas.diesler at jboss.com $
-
-import java.util.Collection;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * A general extendible artifact
- *
- * @author Thomas.Diesler at jboss.com
- * @since 20-Apr-2007
- */
-public interface Extensible
-{
- /** Add arbitrary attachments */
- <T> T addAttachment(Class<T> key, Object value);
-
- /** Get arbitrary attachments */
- <T> Collection<T> getAttachments();
-
- /** Get an arbitrary attachment */
- <T> T getAttachment(Class<T> key);
-
- /** Remove arbitrary attachments */
- <T> T removeAttachment(Class<T> key);
-
- /** Get an property */
- Object getProperty(String key);
-
- /** Set a property */
- void setProperty(String key, Object value);
-
- /** Remove a property */
- void removeProperty(String key);
-
- /** Get the set of property names */
- Set<String> getProperties();
-
- /** Set a map of properties */
- void setProperties(Map<String, Object> props);
-}
\ No newline at end of file
Added: spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/AbstractExtensible.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/AbstractExtensible.java (rev 0)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/AbstractExtensible.java 2007-08-02 13:41:02 UTC (rev 4100)
@@ -0,0 +1,88 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.spi.deployment;
+
+//$Id: BasicDeploymentContext.java 3959 2007-07-20 14:44:19Z heiko.braun at jboss.com $
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
+
+
+/**
+ * A general extendible artifact
+ *
+ * @author Thomas.Diesler at jboss.com
+ * @since 20-Apr-2007
+ */
+public abstract class AbstractExtensible implements Extensible
+{
+ private Map<Class, Object> attachments = new HashMap<Class, Object>();
+ private Map<String, Object> properties = new HashMap<String, Object>();
+
+ public Collection<Object> getAttachments()
+ {
+ return attachments.values();
+ }
+
+ public <T> T getAttachment(Class<T> clazz)
+ {
+ return (T)attachments.get(clazz);
+ }
+
+ public <T> T addAttachment(Class<T> clazz, Object obj)
+ {
+ return (T)attachments.put(clazz, obj);
+ }
+
+ public <T> T removeAttachment(Class<T> key)
+ {
+ return (T)attachments.remove(key);
+ }
+
+ public Set<String> getProperties()
+ {
+ return properties.keySet();
+ }
+
+ public Object getProperty(String key)
+ {
+ return properties.get(key);
+ }
+
+ public void removeProperty(String key)
+ {
+ properties.remove(key);
+ }
+
+ public void setProperty(String key, Object value)
+ {
+ properties.put(key, value);
+ }
+
+ public void setProperties(Map<String, Object> props)
+ {
+ properties.putAll(props);
+ }
+}
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/Deployment.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/Deployment.java 2007-08-02 13:36:49 UTC (rev 4099)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/Deployment.java 2007-08-02 13:41:02 UTC (rev 4100)
@@ -21,7 +21,6 @@
*/
package org.jboss.wsf.spi.deployment;
-import org.jboss.wsf.spi.Extensible;
// $Id$
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/Endpoint.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/Endpoint.java 2007-08-02 13:36:49 UTC (rev 4099)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/Endpoint.java 2007-08-02 13:41:02 UTC (rev 4100)
@@ -25,7 +25,6 @@
import javax.management.ObjectName;
-import org.jboss.wsf.spi.Extensible;
import org.jboss.wsf.spi.invocation.InvocationHandler;
import org.jboss.wsf.spi.invocation.RequestHandler;
import org.jboss.wsf.spi.management.EndpointMetrics;
Copied: spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/Extensible.java (from rev 4099, spi/trunk/src/main/java/org/jboss/wsf/spi/Extensible.java)
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/Extensible.java (rev 0)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/Extensible.java 2007-08-02 13:41:02 UTC (rev 4100)
@@ -0,0 +1,64 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.spi.deployment;
+
+//$Id: Deployment.java 3999 2007-07-26 11:33:20Z thomas.diesler at jboss.com $
+
+import java.util.Collection;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * A general extendible artifact
+ *
+ * @author Thomas.Diesler at jboss.com
+ * @since 20-Apr-2007
+ */
+public interface Extensible
+{
+ /** Add arbitrary attachments */
+ <T> T addAttachment(Class<T> key, Object value);
+
+ /** Get arbitrary attachments */
+ <T> Collection<T> getAttachments();
+
+ /** Get an arbitrary attachment */
+ <T> T getAttachment(Class<T> key);
+
+ /** Remove arbitrary attachments */
+ <T> T removeAttachment(Class<T> key);
+
+ /** Get an property */
+ Object getProperty(String key);
+
+ /** Set a property */
+ void setProperty(String key, Object value);
+
+ /** Remove a property */
+ void removeProperty(String key);
+
+ /** Get the set of property names */
+ Set<String> getProperties();
+
+ /** Set a map of properties */
+ void setProperties(Map<String, Object> props);
+}
\ No newline at end of file
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/Service.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/Service.java 2007-08-02 13:36:49 UTC (rev 4099)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/Service.java 2007-08-02 13:41:02 UTC (rev 4100)
@@ -25,7 +25,6 @@
import java.util.List;
-import org.jboss.wsf.spi.Extensible;
/**
* A general service deployment.
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/http/HttpContext.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/http/HttpContext.java 2007-08-02 13:36:49 UTC (rev 4099)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/http/HttpContext.java 2007-08-02 13:41:02 UTC (rev 4100)
@@ -21,7 +21,7 @@
*/
package org.jboss.wsf.spi.http;
-import org.jboss.wsf.spi.Extensible;
+import org.jboss.wsf.spi.deployment.Extensible;
// $Id: HttpContext.java 1757 2006-12-22 15:40:24Z thomas.diesler at jboss.com $
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/http/HttpServer.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/http/HttpServer.java 2007-08-02 13:36:49 UTC (rev 4099)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/http/HttpServer.java 2007-08-02 13:41:02 UTC (rev 4100)
@@ -25,7 +25,7 @@
import javax.xml.ws.Endpoint;
-import org.jboss.wsf.spi.Extensible;
+import org.jboss.wsf.spi.deployment.Extensible;
/**
* An abstract HTTP Server
Deleted: spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/ExtendableWebServiceContext.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/ExtendableWebServiceContext.java 2007-08-02 13:36:49 UTC (rev 4099)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/ExtendableWebServiceContext.java 2007-08-02 13:41:02 UTC (rev 4100)
@@ -1,88 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.spi.invocation;
-
-import java.security.Principal;
-import java.util.Map;
-import java.util.HashMap;
-
-import javax.xml.ws.EndpointReference;
-import javax.xml.ws.WebServiceContext;
-import javax.xml.ws.handler.MessageContext;
-
-import org.jboss.util.NotImplementedException;
-import org.w3c.dom.Element;
-
-/**
- * A WebServiceContext makes it possible for a web service endpoint implementation
- * class to access message context and security information relative to a request
- * being served. Typically a WebServiceContext is injected into an endpoint implementation
- * class using the Resource annotation.
- *
- * @author Thomas.Diesler at jboss.com
- * @since 03-May-2006
- */
-public abstract class ExtendableWebServiceContext implements WebServiceContext
-{
- private MessageContext messageContext;
-
- private Map<Class, Object> attachments = new HashMap<Class, Object>();
-
- public ExtendableWebServiceContext(MessageContext messageContext)
- {
- this.messageContext = messageContext;
- }
-
- public MessageContext getMessageContext()
- {
- return messageContext;
- }
-
- public abstract Principal getUserPrincipal();
-
- public abstract boolean isUserInRole(String role);
-
- public EndpointReference getEndpointReference(Element... referenceParameters)
- {
- throw new IllegalArgumentException("Not implemented");
- }
-
- public <T extends EndpointReference> T getEndpointReference(Class<T> clazz, Element... referenceParameters)
- {
- throw new IllegalArgumentException("Not implemented");
- }
-
- public <T> T addAttachment(Class<T> key, Object value)
- {
- return (T)attachments.put(key, value);
- }
-
- public <T> T getAttachment(Class<T> key)
- {
- return (T)attachments.get(key);
- }
-
- public <T> T removeAttachment(Class<T> key)
- {
- return (T)attachments.get(key);
- }
-}
\ No newline at end of file
Copied: spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/ExtensibleWebServiceContext.java (from rev 4087, spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/ExtendableWebServiceContext.java)
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/ExtensibleWebServiceContext.java (rev 0)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/ExtensibleWebServiceContext.java 2007-08-02 13:41:02 UTC (rev 4100)
@@ -0,0 +1,69 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.spi.invocation;
+
+import java.security.Principal;
+
+import javax.xml.ws.EndpointReference;
+import javax.xml.ws.WebServiceContext;
+import javax.xml.ws.handler.MessageContext;
+
+import org.jboss.wsf.spi.deployment.AbstractExtensible;
+import org.w3c.dom.Element;
+
+/**
+ * A WebServiceContext makes it possible for a web service endpoint implementation
+ * class to access message context and security information relative to a request
+ * being served. Typically a WebServiceContext is injected into an endpoint implementation
+ * class using the Resource annotation.
+ *
+ * @author Thomas.Diesler at jboss.com
+ * @since 03-May-2006
+ */
+public abstract class ExtensibleWebServiceContext extends AbstractExtensible implements WebServiceContext
+{
+ private MessageContext messageContext;
+
+ public ExtensibleWebServiceContext(MessageContext messageContext)
+ {
+ this.messageContext = messageContext;
+ }
+
+ public MessageContext getMessageContext()
+ {
+ return messageContext;
+ }
+
+ public abstract Principal getUserPrincipal();
+
+ public abstract boolean isUserInRole(String role);
+
+ public EndpointReference getEndpointReference(Element... referenceParameters)
+ {
+ throw new IllegalArgumentException("Not implemented");
+ }
+
+ public <T extends EndpointReference> T getEndpointReference(Class<T> clazz, Element... referenceParameters)
+ {
+ throw new IllegalArgumentException("Not implemented");
+ }
+}
\ No newline at end of file
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/WebServiceContextEJB.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/WebServiceContextEJB.java 2007-08-02 13:36:49 UTC (rev 4099)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/WebServiceContextEJB.java 2007-08-02 13:41:02 UTC (rev 4100)
@@ -23,7 +23,7 @@
// $Id$
-import org.jboss.wsf.spi.invocation.ExtendableWebServiceContext;
+import org.jboss.wsf.spi.invocation.ExtensibleWebServiceContext;
import java.security.Principal;
@@ -36,7 +36,7 @@
* @author Thomas.Diesler at jboss.org
* @since 23-Jan-2007
*/
-public class WebServiceContextEJB extends ExtendableWebServiceContext
+public class WebServiceContextEJB extends ExtensibleWebServiceContext
{
public WebServiceContextEJB(MessageContext msgContext)
{
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/WebServiceContextFactory.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/WebServiceContextFactory.java 2007-08-02 13:36:49 UTC (rev 4099)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/WebServiceContextFactory.java 2007-08-02 13:41:02 UTC (rev 4100)
@@ -31,5 +31,5 @@
*/
public abstract class WebServiceContextFactory implements SPIView
{
- public abstract ExtendableWebServiceContext newWebServiceContext(InvocationType type, MessageContext messageContext);
+ public abstract ExtensibleWebServiceContext newWebServiceContext(InvocationType type, MessageContext messageContext);
}
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/WebServiceContextJSE.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/WebServiceContextJSE.java 2007-08-02 13:36:49 UTC (rev 4099)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/WebServiceContextJSE.java 2007-08-02 13:41:02 UTC (rev 4100)
@@ -23,7 +23,7 @@
// $Id$
-import org.jboss.wsf.spi.invocation.ExtendableWebServiceContext;
+import org.jboss.wsf.spi.invocation.ExtensibleWebServiceContext;
import java.security.Principal;
@@ -36,7 +36,7 @@
* @author Thomas.Diesler at jboss.org
* @since 23-Jan-2007
*/
-public class WebServiceContextJSE extends ExtendableWebServiceContext
+public class WebServiceContextJSE extends ExtensibleWebServiceContext
{
private HttpServletRequest httpRequest;
Deleted: spi/trunk/src/main/java/org/jboss/wsf/spi/management/DefaultEndpointRegistry.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/management/DefaultEndpointRegistry.java 2007-08-02 13:36:49 UTC (rev 4099)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/management/DefaultEndpointRegistry.java 2007-08-02 13:41:02 UTC (rev 4100)
@@ -1,106 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.spi.management;
-
-// $Id$
-
-import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.management.EndpointRegistry;
-
-import javax.management.ObjectName;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * A general endpoint registry.
- *
- * @author Thomas.Diesler at jboss.com
- * @since 20-Apr-2007
- */
-public class DefaultEndpointRegistry implements EndpointRegistry
-{
- // provide logging
- private static final Logger log = Logger.getLogger(DefaultEndpointRegistry.class);
-
- private Map<ObjectName, Endpoint> endpoints = new HashMap<ObjectName, Endpoint>();
-
- public Endpoint getEndpoint(ObjectName epName)
- {
- if (epName == null)
- throw new IllegalArgumentException("Endpoint name cannot be null");
-
- if (isRegistered(epName) == false)
- throw new IllegalStateException("Endpoint not registered: " + epName);
-
- Endpoint endpoint = endpoints.get(epName);
- return endpoint;
- }
-
- public Endpoint resolve(EndpointResolver resolver)
- {
- return resolver.query(endpoints.values().iterator());
- }
-
- public boolean isRegistered(ObjectName epName)
- {
- if (epName == null)
- throw new IllegalArgumentException("Endpoint name cannot be null");
-
- return endpoints.get(epName) != null;
- }
-
- public Set<ObjectName> getEndpoints()
- {
- return endpoints.keySet();
- }
-
- public void register(Endpoint endpoint)
- {
- if (endpoint == null)
- throw new IllegalArgumentException("Endpoint cannot be null");
-
- ObjectName epName = endpoint.getName();
- if (epName == null)
- throw new IllegalStateException("Endpoint name cannot be null for: " + endpoint);
-
- if (isRegistered(epName))
- throw new IllegalStateException("Endpoint already registered: " + epName);
-
- log.info("register: " + epName);
- endpoints.put(epName, endpoint);
- }
-
- public void unregister(Endpoint endpoint)
- {
- if (endpoint == null)
- throw new IllegalArgumentException("Endpoint cannot be null");
-
- ObjectName epName = endpoint.getName();
- if (isRegistered(epName) == false)
- throw new IllegalStateException("Endpoint not registered: " + epName);
-
- log.info("remove: " + epName);
- endpoints.remove(epName);
- }
-}
More information about the jbossws-commits
mailing list