當前位置: 首頁>>代碼示例>>Java>>正文


Java ManagedReference類代碼示例

本文整理匯總了Java中org.jboss.as.naming.ManagedReference的典型用法代碼示例。如果您正苦於以下問題:Java ManagedReference類的具體用法?Java ManagedReference怎麽用?Java ManagedReference使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ManagedReference類屬於org.jboss.as.naming包,在下文中一共展示了ManagedReference類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getReference

import org.jboss.as.naming.ManagedReference; //導入依賴的package包/類
@Override
public ManagedReference getReference() {
    DefaultGelfSenderConfiguration senderConfiguration = new DefaultGelfSenderConfiguration();
    senderConfiguration.setHost(configuration.getHost());
    senderConfiguration.setPort(configuration.getPort());

    final GelfSender gelfSender = GelfSenderFactory.createSender(senderConfiguration);

    return new ValueManagedReference(new ImmediateValue<Object>(gelfSender)) {
        @Override
        public void release() {
            gelfSender.close();
        }
    };
}
 
開發者ID:mp911de,項目名稱:logstash-gelf-subsystem,代碼行數:16,代碼來源:GelfSenderManagedReferenceFactory.java

示例2: getReference

import org.jboss.as.naming.ManagedReference; //導入依賴的package包/類
@Override
public ManagedReference getReference() {
    DefaultGelfSenderConfiguration senderConfiguration = new DefaultGelfSenderConfiguration();
    senderConfiguration.setHost(configuration.getHost());
    senderConfiguration.setPort(configuration.getPort());

    final DatenpumpeImpl datenpumpe = new DatenpumpeImpl(senderConfiguration);

    return new ValueManagedReference(new ImmediateValue<Object>(datenpumpe)) {
        @Override
        public void release() {
            datenpumpe.close();
        }
    };
}
 
開發者ID:mp911de,項目名稱:logstash-gelf-subsystem,代碼行數:16,代碼來源:DatenpumpeManagedReferenceFactory.java

示例3: getReference

import org.jboss.as.naming.ManagedReference; //導入依賴的package包/類
public ManagedReference getReference() {
  return new ManagedReference() {

    public void release() {
    }

    public Object getInstance() {
      return processEngine;
    }
  };
}
 
開發者ID:camunda,項目名稱:camunda-bpm-platform,代碼行數:12,代碼來源:ProcessEngineManagedReferenceFactory.java

示例4: getReference

import org.jboss.as.naming.ManagedReference; //導入依賴的package包/類
public ManagedReference getReference() {
  return new ManagedReference() {

    public void release() {
    }

    public Object getInstance() {
      return service;
    }
  };
}
 
開發者ID:camunda,項目名稱:camunda-bpm-platform,代碼行數:12,代碼來源:PlatformServiceReferenceFactory.java

示例5: getReference

import org.jboss.as.naming.ManagedReference; //導入依賴的package包/類
public synchronized ManagedReference getReference() {
    return reference;
}
 
開發者ID:kenweezy,項目名稱:teiid,代碼行數:4,代碼來源:ReferenceFactoryService.java


注:本文中的org.jboss.as.naming.ManagedReference類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。