本文整理匯總了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();
}
};
}
示例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();
}
};
}
示例3: getReference
import org.jboss.as.naming.ManagedReference; //導入依賴的package包/類
public ManagedReference getReference() {
return new ManagedReference() {
public void release() {
}
public Object getInstance() {
return processEngine;
}
};
}
示例4: getReference
import org.jboss.as.naming.ManagedReference; //導入依賴的package包/類
public ManagedReference getReference() {
return new ManagedReference() {
public void release() {
}
public Object getInstance() {
return service;
}
};
}
示例5: getReference
import org.jboss.as.naming.ManagedReference; //導入依賴的package包/類
public synchronized ManagedReference getReference() {
return reference;
}