本文整理汇总了Java中org.wso2.carbon.integration.common.admin.client.NDataSourceAdminServiceClient类的典型用法代码示例。如果您正苦于以下问题:Java NDataSourceAdminServiceClient类的具体用法?Java NDataSourceAdminServiceClient怎么用?Java NDataSourceAdminServiceClient使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NDataSourceAdminServiceClient类属于org.wso2.carbon.integration.common.admin.client包,在下文中一共展示了NDataSourceAdminServiceClient类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import org.wso2.carbon.integration.common.admin.client.NDataSourceAdminServiceClient; //导入依赖的package包/类
@BeforeClass(alwaysRun = true)
public void init()
throws Exception {
super.init(TestUserMode.SUPER_TENANT_ADMIN);
String loggedInSessionCookie = getSessionCookie();
eventSimulatorAdminServiceClient = configurationUtil.getEventSimulatorAdminServiceClient(backendURL, loggedInSessionCookie);
eventStreamManagerAdminServiceClient = configurationUtil.getEventStreamManagerAdminServiceClient(backendURL, loggedInSessionCookie);
eventPublisherAdminServiceClient = configurationUtil.getEventPublisherAdminServiceClient(backendURL, loggedInSessionCookie);
NDataSourceAdminServiceClient dataSourceAdminService =
new NDataSourceAdminServiceClient(backendURL, loggedInSessionCookie);
WSDataSourceMetaInfo dataSourceInfo = getDataSourceInformation("WSO2CEP_DB");
dataSourceAdminService.addDataSource(dataSourceInfo);
}
示例2: init
import org.wso2.carbon.integration.common.admin.client.NDataSourceAdminServiceClient; //导入依赖的package包/类
@BeforeClass(alwaysRun = true)
public void init() throws Exception {
super.init(TestUserMode.SUPER_TENANT_ADMIN);
String loggedInSessionCookie = getSessionCookie();
eventStreamManagerAdminServiceClient = configurationUtil
.getEventStreamManagerAdminServiceClient(backendURL, loggedInSessionCookie);
eventSimulatorAdminServiceClient = configurationUtil
.getEventSimulatorAdminServiceClient(backendURL, loggedInSessionCookie);
eventPublisherAdminServiceClient = configurationUtil
.getEventPublisherAdminServiceClient(backendURL, loggedInSessionCookie);
NDataSourceAdminServiceClient dataSourceAdminService =
new NDataSourceAdminServiceClient(backendURL, loggedInSessionCookie);
WSDataSourceMetaInfo dataSourceInfo = getDataSourceInformation("WSO2CEP_DB");
dataSourceAdminService.addDataSource(dataSourceInfo);
}
示例3: init
import org.wso2.carbon.integration.common.admin.client.NDataSourceAdminServiceClient; //导入依赖的package包/类
@BeforeClass(alwaysRun = true)
public void init()
throws Exception {
super.init(TestUserMode.SUPER_TENANT_ADMIN);
String loggedInSessionCookie = getSessionCookie();
eventSimulatorAdminServiceClient = configurationUtil.getEventSimulatorAdminServiceClient(backendURL, loggedInSessionCookie);
eventStreamManagerAdminServiceClient = configurationUtil.getEventStreamManagerAdminServiceClient(backendURL, loggedInSessionCookie);
eventPublisherAdminServiceClient = configurationUtil.getEventPublisherAdminServiceClient(backendURL, loggedInSessionCookie);
eventProcessorAdminServiceClient = configurationUtil.getEventProcessorAdminServiceClient(backendURL, loggedInSessionCookie);
NDataSourceAdminServiceClient dataSourceAdminService =
new NDataSourceAdminServiceClient(backendURL, loggedInSessionCookie);
WSDataSourceMetaInfo dataSourceInfo = getDataSourceInformation("WSO2CEP_EVENT_TABLE_DB");
dataSourceAdminService.addDataSource(dataSourceInfo);
}
示例4: removeDataSources
import org.wso2.carbon.integration.common.admin.client.NDataSourceAdminServiceClient; //导入依赖的package包/类
private void removeDataSources() throws Exception {
NDataSourceAdminServiceClient
dataSourceAdminClient = new NDataSourceAdminServiceClient(dssContext.getContextUrls().getBackEndUrl(), sessionCookie);
dataSourceAdminClient.deleteDataSource("IN_MEMORY_SAMPLE_DS");
dataSourceAdminClient.deleteDataSource("ECHO_SAMPLE_DS");
Thread.sleep(1000);
}
示例5: initialize
import org.wso2.carbon.integration.common.admin.client.NDataSourceAdminServiceClient; //导入依赖的package包/类
@BeforeClass(alwaysRun = true)
public void initialize() throws Exception {
super.init();
serverManager = new ServerConfigurationManager(context);
NodeList nodeList = context.getConfigurationNodeList("//datasource");
mysqlConnection = createMySqlConnection(nodeList);
addPhysicalDBonMySql(datasource1);
addPhysicalDBonMySql(datasource2);
//copping dependency jms jar files to component/lib
serverManager.copyToComponentLib(new File(FrameworkPathUtil.getSystemResourceLocation()
+ File.separator + "artifacts" + File.separator + "ESB" + File.separator + "jar" +
File.separator + MYSQL_LIB));
serverManager.restartGracefully();
super.init();
dataSourceAdminServiceClient =
new NDataSourceAdminServiceClient(contextUrls.getBackEndUrl(), getSessionCookie());
addDataSources(datasource1);
addDataSources(datasource2);
loadSampleESBConfiguration(657);
}
示例6: init
import org.wso2.carbon.integration.common.admin.client.NDataSourceAdminServiceClient; //导入依赖的package包/类
@BeforeClass(alwaysRun = true)
public void init() throws Exception {
super.init(TestUserMode.SUPER_TENANT_ADMIN);
cepServer = new AutomationContext("CEP", "cep002", TestUserMode.SUPER_TENANT_ADMIN);
server = new CarbonTestServerManager(cepServer, 801);
ServerConfigurationManager serverConfigManager1 = new ServerConfigurationManager(cepServer);
manager.startServers(server);
String CARBON_HOME = server.getCarbonHome();
String outputEventAdapterConfFileLocation = RESOURCE_LOCATION1 + File.separator +
OUTPUT_EVENT_ADAPTER_CONF_FILE;
String cepoutputEventAdapterConfFileLocation = CARBON_HOME + File.separator + "repository" + File.separator
+ "conf" + File.separator + OUTPUT_EVENT_ADAPTER_CONF_FILE;
serverConfigManager1.applyConfigurationWithoutRestart(new File(outputEventAdapterConfFileLocation),
new File(cepoutputEventAdapterConfFileLocation), true);
log.info("Restarting CEP server");
serverConfigManager1.restartGracefully();
Thread.sleep(5000);
String backendURL = cepServer.getContextUrls().getBackEndUrl();
String loggedInSessionCookie = getSessionCookie(cepServer);
eventStreamManagerAdminServiceClient = configurationUtil
.getEventStreamManagerAdminServiceClient(backendURL, loggedInSessionCookie);
eventPublisherAdminServiceClient = configurationUtil
.getEventPublisherAdminServiceClient(backendURL, loggedInSessionCookie);
eventSimulatorAdminServiceClient = configurationUtil
.getEventSimulatorAdminServiceClient(backendURL, loggedInSessionCookie);
NDataSourceAdminServiceClient dataSourceAdminService =
new NDataSourceAdminServiceClient(backendURL, loggedInSessionCookie);
WSDataSourceMetaInfo dataSourceInfo = getDataSourceInformation("WSO2CEP_DB");
dataSourceAdminService.addDataSource(dataSourceInfo);
}
示例7: addDataSources
import org.wso2.carbon.integration.common.admin.client.NDataSourceAdminServiceClient; //导入依赖的package包/类
private void addDataSources() throws Exception {
NDataSourceAdminServiceClient
dataSourceAdminClient = new NDataSourceAdminServiceClient(dssContext.getContextUrls().getBackEndUrl(), sessionCookie);
//Adding IN_MEMORY_SAMPLE_DS data source
WSDataSourceMetaInfo sampleDSSourceMetaInfo = new WSDataSourceMetaInfo();
sampleDSSourceMetaInfo.setName("IN_MEMORY_SAMPLE_DS");
sampleDSSourceMetaInfo.setDescription("A sample in-memory datasource");
WSDataSourceMetaInfo_WSDataSourceDefinition dataSourceDefinition = new WSDataSourceMetaInfo_WSDataSourceDefinition();
dataSourceDefinition.setType("DS_CUSTOM_TABULAR");
String sampleDsConfig = "<configuration xmlns:svns=\"http://org.wso2.securevault/configuration\" xmlns:xml=\"http://www.w3.org/XML/1998/namespace\">" +
" <customDataSourceClass>org.wso2.carbon.dataservices.core.custom.datasource.InMemoryDataSource</customDataSourceClass>" +
" <customDataSourceProps><property name=\"inmemory_datasource_schema\">{Vehicles:[ID,Model,Classification,Year]}</property>" +
" <property name=\"inmemory_datasource_records\">" +
" {Vehicles:[[\"S10_1678\",\"Harley Davidson Ultimate Chopper\",\"Motorcycles\",\"1969\"]," +
" [\"S10_1949\",\"Alpine Renault 1300\",\"Classic Cars\",\"1952\"]," +
" [\"S10_2016\",\"Moto Guzzi 1100i\",\"Motorcycles\",\"1996\"]," +
" [\"S10_4698\",\"Harley-Davidson Eagle Drag Bike\",\"Motorcycles\",\"2003\"]," +
" [\"S10_4757\",\"Alfa Romeo GTA\",\"Classic Cars\",\"1972\"]," +
" [\"S10_4962\",\"LanciaA Delta 16V\",\"Classic Cars\",\"1962\"]," +
" [\"S12_1099\",\"Ford Mustang\",\"Classic Cars\",\"1968\"]," +
" [\"S12_1108\",\"Ferrari Enzo\",\"Classic Cars\",\"2001\"]]}" +
" </property></customDataSourceProps>" +
"</configuration>";
dataSourceDefinition.setDsXMLConfiguration(sampleDsConfig);
sampleDSSourceMetaInfo.setDefinition(dataSourceDefinition);
dataSourceAdminClient.addDataSource(sampleDSSourceMetaInfo);
Thread.sleep(1000);
//Adding ECHO_SAMPLE_DS data source
WSDataSourceMetaInfo echoSampleSourceMetaInfo = new WSDataSourceMetaInfo();
echoSampleSourceMetaInfo.setName("ECHO_SAMPLE_DS");
echoSampleSourceMetaInfo.setDescription("A sample in-memory datasource");
WSDataSourceMetaInfo_WSDataSourceDefinition echoSampleDSDefinition = new WSDataSourceMetaInfo_WSDataSourceDefinition();
echoSampleDSDefinition.setType("DS_CUSTOM_TABULAR");
String echoSampleDsConfig = "<configuration xmlns:svns=\"http://org.wso2.securevault/configuration\" xmlns:xml=\"http://www.w3.org/XML/1998/namespace\">" +
"<customDataSourceClass>org.wso2.carbon.dataservices.core.custom.datasource.InMemoryDataSource</customDataSourceClass>" +
"<customDataSourceProps>" +
"<property name=\"p1\">val1</property>" +
"<property name=\"p2\">val2</property>" +
"</customDataSourceProps>" +
"</configuration>";
echoSampleDSDefinition.setDsXMLConfiguration(echoSampleDsConfig);
echoSampleSourceMetaInfo.setDefinition(echoSampleDSDefinition);
dataSourceAdminClient.addDataSource(echoSampleSourceMetaInfo);
Thread.sleep(1000);
}