![JAR search and dependency download from the Maven repository](/logo.png)
org.ow2.weblab.components.client.WebLabService Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of weblab-client Show documentation
Show all versions of weblab-client Show documentation
This library aims to provide a central access point to the services exposed on the ESB
without forcing each part of the system to know the actual location of the ESB and the names
of the exposed endpoints.
For this sake it allows to map service URI (ie referring to service in webLab taxonomy)
to the actual exposed URL on the ESB within the context of a specific project. The library
and the configuration should be added in portal lib in order to be central and available to
any portlets.
The mapping is done in a simple spring config file "webLabClient.xml" which must be accessible
in JAVA classpath.
The newest version!
/**
* WEBLAB: Service oriented integration platform for media mining and intelligence applications
*
* Copyright (C) 2004 - 2011 CASSIDIAN an EADS Company
*
* This library 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 library 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
* library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
package org.ow2.weblab.components.client;
import java.util.HashMap;
import java.util.Map;
import javax.xml.namespace.QName;
public class WebLabService {
private String uri;
private String baseUrl;
private Map qNameToClientMap = new HashMap();
public WebLabService(String uri, String url) {
super();
// TODO check that the URI is valid?
this.uri = uri;
// TODO check that the URL is valid?
this.baseUrl = url;
}
public String getUri() {
return uri;
}
public String getBaseUrl() {
return baseUrl;
}
public Object getClient(QName interfaceQName){
return qNameToClientMap.get(interfaceQName);
}
protected synchronized void addClient(QName interfaceQName, Object client){
qNameToClientMap.put(interfaceQName, client);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy