• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java Connect类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.mule.api.annotations.Connect的典型用法代码示例。如果您正苦于以下问题:Java Connect类的具体用法?Java Connect怎么用?Java Connect使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Connect类属于org.mule.api.annotations包,在下文中一共展示了Connect类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: connect

import org.mule.api.annotations.Connect; //导入依赖的package包/类
/**
 * Connect to the Anaplan API using an issued certificate. The certificate
 * path is provided and the file is loaded into a Java Keystore and loaded
 * into a X509Certificate object for use.
 *
 * @param certificatePath Filepath to certificate on local filesystem
 * @param url API URL.
 * @param proxyHost Proxy username if behind firewall.
 * @param proxyUser Proxy username to get through firewall.
 * @param proxyPass Proxy password to get through firewall.
 * @throws org.mule.api.ConnectionException Whenever the connection to API
 * 		fails due to expired certificate or invalid API endpoint or proxy
    * 	    details.
 */
@Connect
@TestConnectivity
public synchronized void connect(
		@ConnectionKey @Path String certificatePath,
		@Default("https://api.anaplan.com/") String url,
		@Optional @Default("") String proxyHost,
		@Optional @Default("") String proxyUser,
		@Optional @Default("") String proxyPass)
				throws org.mule.api.ConnectionException {

	logger.info("Initiating certificate connection...");

	if (apiConn == null) {
		// create the connection strategy using certificate path.
		apiConn = new AnaplanConnection(true, certificatePath, url,
				proxyHost, proxyUser, proxyPass);
		// Establish connection using new connection object and verify
		// service parameters
		connectToApi();
	}
}
 
开发者ID:anaplaninc,项目名称:anaplan-mulesoft,代码行数:36,代码来源:CertAuthConnectionStrategy.java


示例2: connect

import org.mule.api.annotations.Connect; //导入依赖的package包/类
/**
 * Connect to the Anaplan API via basic authentication using provided
 * username and password.
 *
 * @param username User's username to login to Anaplan API.
 * @param password User's password to login to Anaplan API.
 * @param url API URL.
 * @param proxyHost Proxy URL if behind firewall.
 * @param proxyUser Proxy username to get past firewall.
 * @param proxyPass Proxy password to get past firewall.
 * @throws org.mule.api.ConnectionException Whenever the connection to
 * 		Anaplan API fails using provided credentials.
 */
@Connect
@TestConnectivity
public synchronized void connect(
		@ConnectionKey String username,
		@Password String password,
		@Default("https://api.anaplan.com/") String url,
		@Optional @Default("") String proxyHost,
		@Optional @Default("") String proxyUser,
		@Optional @Password @Default("") String proxyPass)
				throws org.mule.api.ConnectionException {

	logger.info("Initiating basic connection...");

	if (apiConn == null) {
		// create the connStrategy object using credentials provided.
		apiConn = new AnaplanConnection(false, username, password, url,
				proxyHost, proxyUser, proxyPass);
		// Establish connection using new connection object and verify
		// service parameters
		connectToApi();
	}
}
 
开发者ID:anaplaninc,项目名称:anaplan-mulesoft,代码行数:36,代码来源:BasicAuthConnectionStrategy.java


示例3: connect

import org.mule.api.annotations.Connect; //导入依赖的package包/类
@Connect
public void connect() {
	ConnectionFactory factory = new ConnectionFactory();
	factory.setHost(host);
	factory.setUsername(username);
	factory.setPassword(password);
	

	try {
		connection = factory.newConnection();
		channel = connection.createChannel();

		channel.queueDeclare(queueName, false, false, false, null);
	} catch(IOException e) {
		e.printStackTrace();
	}		
}
 
开发者ID:maleficarum,项目名称:mule-rabbitmq,代码行数:18,代码来源:RabbitMQCloudConnector.java


示例4: connect

import org.mule.api.annotations.Connect; //导入依赖的package包/类
/**
 * Connect
 *
 * @param username A username
 * @param password A password
 * @throws ConnectionException
 */
@Connect
public void connect(@ConnectionKey String username, @Password String password)
    throws ConnectionException {
    /*
     * CODE FOR ESTABLISHING A CONNECTION GOES HERE
     */
}
 
开发者ID:berndruecker,项目名称:mule-camunda-24,代码行数:15,代码来源:camundaConnector.java


示例5: connect

import org.mule.api.annotations.Connect; //导入依赖的package包/类
/**
  * Establishes the database connection using the given bucket name and password.
  *
  * @param bucketName The bucket name in the cluster you wish to use.
  * @param password   The password for the bucket.  Default is empty.
  * @throws ConnectionException
  */
 @Connect
 public void connect(@ConnectionKey String bucketName, String password) throws ConnectionException {
         this.BucketName = bucketName;
         
 		List<URI> uris = new LinkedList<URI>();
 		uris.add(URI.create(this.Uri));            
 		
 		try {
	client = new CouchbaseClient(uris, bucketName, password);
} catch (IOException e) {
	e.printStackTrace();
}
 }
 
开发者ID:ryan1234,项目名称:mule-couchbase,代码行数:21,代码来源:CouchbaseConnector.java


示例6: connect

import org.mule.api.annotations.Connect; //导入依赖的package包/类
@Connect
public void connect(@ConnectionKey String username, @Password String password)
        throws ConnectionException
{
    this.client = DrupalClientFactory.getClient(endpoint, new CookieAuthenticationStrategy(
            username, password, endpoint + "/user"));
}
 
开发者ID:ryandcarter,项目名称:drupal8-connector,代码行数:8,代码来源:Drupal8Connector.java


示例7: connect

import org.mule.api.annotations.Connect; //导入依赖的package包/类
/**
 * Connect to KissMetrics.
 *
 * @param apiKey The API Key from your KissMetrics settings screen.
 * @throws ConnectionException
 */
@Connect
@TestConnectivity(active=false)
public void connect(@ConnectionKey String apiKey)
    throws ConnectionException {
    this.apiKey = apiKey;
    
    final ClientConfig clientConfig = new ClientConfig();
    ObjectMapper mapper = new ObjectMapper();
    mapper.configure(DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES, false);
    JacksonJsonProvider jsonProvider = new JacksonJsonProvider(mapper);
    
    clientConfig.register(JacksonJsonProvider.class);
    this.client = ClientBuilder.newClient(clientConfig);
}
 
开发者ID:mulesoft,项目名称:kissmetrics-connector,代码行数:21,代码来源:KissMetricsConnector.java


示例8: connect

import org.mule.api.annotations.Connect; //导入依赖的package包/类
/**
 * Connect to Nuxeo Server via Automation java client
 *
 * @param username Nuxeo user name
 * @param password Nuxeo password
 * @throws ConnectionException
 */
@Connect
public void connect(@ConnectionKey
String username, @Password
String password) throws ConnectionException {
    AutomationClient client = new HttpAutomationClient(getServerUrl());
    session = client.getSession(username, password);
    session.setDefaultSchemas(defaultSchemas);
    docService = session.getAdapter(DocumentService.class);

    logger.info("Connect Nuxeo Connector");
}
 
开发者ID:tiry,项目名称:nuxeo-mule-connector,代码行数:19,代码来源:NuxeoConnector.java



注:本文中的org.mule.api.annotations.Connect类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Job类代码示例发布时间:2022-05-22
下一篇:
Java ImgLibException类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap