Author: jim.ma
Date: 2015-03-10 05:02:06 -0400 (Tue, 10 Mar 2015)
New Revision: 19546
Added:
spi/branches/management/src/main/java/org/jboss/wsf/spi/deployment/RuntimeConfig.java
Modified:
spi/branches/management/src/main/java/org/jboss/wsf/spi/deployment/AbstractExtensible.java
spi/branches/management/src/main/java/org/jboss/wsf/spi/deployment/Endpoint.java
spi/branches/management/src/main/java/org/jboss/wsf/spi/deployment/Extensible.java
spi/branches/management/src/main/java/org/jboss/wsf/spi/management/ServerConfig.java
Log:
[JBWS-3880]Add apis to allow get all configurations and runtime properties from Endpoint
Modified:
spi/branches/management/src/main/java/org/jboss/wsf/spi/deployment/AbstractExtensible.java
===================================================================
---
spi/branches/management/src/main/java/org/jboss/wsf/spi/deployment/AbstractExtensible.java 2015-03-09
21:53:55 UTC (rev 19545)
+++
spi/branches/management/src/main/java/org/jboss/wsf/spi/deployment/AbstractExtensible.java 2015-03-10
09:02:06 UTC (rev 19546)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2013, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2015, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
@@ -37,23 +37,27 @@
*
* @author Thomas.Diesler(a)jboss.com
* @author alessio.soldano(a)jboss.com
+ * @author <a href="mailto:ema@redhat.com">Jim Ma</a>
* @since 20-Apr-2007
*/
public abstract class AbstractExtensible implements Extensible
{
private final Map<Class<?>, Object> attachments;
private final Map<String, Object> properties;
+ private final Map<String, String> runtimeProperties;
public AbstractExtensible()
{
this.attachments = new HashMap<Class<?>, Object>();
this.properties = new HashMap<String, Object>();
+ this.runtimeProperties = new HashMap<String, String>(10);
}
public AbstractExtensible(int initialAttachmentsSize, int initialPropertiesSize)
{
this.attachments = new HashMap<Class<?>,
Object>(initialAttachmentsSize);
this.properties = new HashMap<String, Object>(initialPropertiesSize);
+ this.runtimeProperties = new HashMap<String, String>(10);
}
public Collection<Object> getAttachments()
@@ -103,5 +107,26 @@
{
properties.putAll(props);
}
+
+ /** Get runtime changeable property*/
+ public String getRuntimeProperty(String key) {
+ return this.runtimeProperties.get(key);
+ }
+
+ /** Set runtime changeable property*/
+ public void setRuntimeProperty(String key, String value) {
+ this.runtimeProperties.put(key, value);
+ }
+
+ /** Remove a runtime changeable property */
+ public void removeRuntimeProperty(String key) {
+ this.runtimeProperties.remove(key);
+ }
+
+ /** Get the set of runtime changeable property names */
+ public Map<String, String> getRuntimeProperties() {
+ return this.runtimeProperties;
+ }
+
}
Modified:
spi/branches/management/src/main/java/org/jboss/wsf/spi/deployment/Endpoint.java
===================================================================
---
spi/branches/management/src/main/java/org/jboss/wsf/spi/deployment/Endpoint.java 2015-03-09
21:53:55 UTC (rev 19545)
+++
spi/branches/management/src/main/java/org/jboss/wsf/spi/deployment/Endpoint.java 2015-03-10
09:02:06 UTC (rev 19546)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2015, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
@@ -22,6 +22,7 @@
package org.jboss.wsf.spi.deployment;
import java.util.List;
+import java.util.Map;
import javax.management.ObjectName;
@@ -37,6 +38,7 @@
* A general JAXWS endpoint.
*
* @author Thomas.Diesler(a)jboss.com
+ * @author <a href="mailto:ema@redhat.com">Jim Ma</a>
* @since 20-Apr-2007
*/
public interface Endpoint extends Extensible
@@ -45,6 +47,19 @@
static final String SEPID_DOMAIN = "jboss.ws";
static final String SEPID_PROPERTY_CONTEXT = "context";
static final String SEPID_PROPERTY_ENDPOINT = "endpoint";
+ static final String SERVICE = "servce";
+ static final String NAME = "name";
+ static final String SHORTNAME="shortname";
+ static final String STATE = "state";
+ static final String TYPE = "type";
+ static final String TARGETBEAN = "targetBean";
+ static final String REQUESTHANDLER = "requestHandler";
+ static final String INVOCATIONHANDLER = "invocationHandler";
+ static final String LIFECYCLEHANDLER = "lifecyleHandler";
+ static final String ADDRESS = "address";
+ static final String PRE_HANDLERCHAIN = "preHandlerChain";
+ static final String POST_HANDLERCHAIN = "postHandlerChain";
+ static final String SECURITY_DOMAIN = "securityDomain";
static final String SEPID_DOMAIN_ENDPOINT = SEPID_DOMAIN + "." +
SEPID_PROPERTY_ENDPOINT;
@@ -142,5 +157,8 @@
EndpointConfig getEndpointConfig();
/** Set endpoint config */
- void setEndpointConfig(EndpointConfig config);
+ void setEndpointConfig(EndpointConfig config);
+
+ Map<String, String> getAllConfigsMap();
+
}
Modified:
spi/branches/management/src/main/java/org/jboss/wsf/spi/deployment/Extensible.java
===================================================================
---
spi/branches/management/src/main/java/org/jboss/wsf/spi/deployment/Extensible.java 2015-03-09
21:53:55 UTC (rev 19545)
+++
spi/branches/management/src/main/java/org/jboss/wsf/spi/deployment/Extensible.java 2015-03-10
09:02:06 UTC (rev 19546)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2015, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
@@ -29,9 +29,10 @@
* A general extendible artifact
*
* @author Thomas.Diesler(a)jboss.com
+ * @author <a href="mailto:ema@redhat.com">Jim Ma</a>
* @since 20-Apr-2007
*/
-public interface Extensible
+public interface Extensible extends RuntimeConfig
{
/** Add arbitrary attachments */
<T> T addAttachment(Class<T> key, Object value);
@@ -58,5 +59,5 @@
Set<String> getProperties();
/** Set a map of properties */
- void setProperties(Map<String, Object> props);
+ void setProperties(Map<String, Object> props);
}
Added:
spi/branches/management/src/main/java/org/jboss/wsf/spi/deployment/RuntimeConfig.java
===================================================================
--- spi/branches/management/src/main/java/org/jboss/wsf/spi/deployment/RuntimeConfig.java
(rev 0)
+++
spi/branches/management/src/main/java/org/jboss/wsf/spi/deployment/RuntimeConfig.java 2015-03-10
09:02:06 UTC (rev 19546)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2015, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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;
+
+import java.util.Map;
+/**
+ * Runtime config interface to allow change various property in runtime
+ * @author <a href="mailto:ema@redhat.com">Jim Ma</a>
+ *
+ */
+public interface RuntimeConfig {
+ static final String STATISTICS_ENABLED = "statistics-enabled";
+ /** Get runtime changeable property */
+ String getRuntimeProperty(String key);
+
+ /** Set runtime changeable property */
+ void setRuntimeProperty(String key, String value);
+
+ /** Remove a runtime changeable property */
+ void removeRuntimeProperty(String key);
+
+ /** Get the set of runtime changeable property names */
+ Map<String, String> getRuntimeProperties();
+
+}
Property changes on:
spi/branches/management/src/main/java/org/jboss/wsf/spi/deployment/RuntimeConfig.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Modified:
spi/branches/management/src/main/java/org/jboss/wsf/spi/management/ServerConfig.java
===================================================================
---
spi/branches/management/src/main/java/org/jboss/wsf/spi/management/ServerConfig.java 2015-03-09
21:53:55 UTC (rev 19545)
+++
spi/branches/management/src/main/java/org/jboss/wsf/spi/management/ServerConfig.java 2015-03-10
09:02:06 UTC (rev 19546)
@@ -24,6 +24,7 @@
import java.io.File;
import java.net.UnknownHostException;
+import org.jboss.wsf.spi.deployment.Extensible;
import org.jboss.wsf.spi.metadata.config.ClientConfig;
import org.jboss.wsf.spi.metadata.config.EndpointConfig;
@@ -32,9 +33,10 @@
*
* @author Thomas.Diesler(a)jboss.org
* @author alessio.soldano(a)jboss.com
+ * @author <a href="mailto:ema@redhat.com">Jim Ma</a>
* @since 08-May-2006
*/
-public interface ServerConfig
+public interface ServerConfig extends Extensible
{
/** The host name that is returned if there is no other defined */
String UNDEFINED_HOSTNAME = "jbossws.undefined.host";