当前位置: 首页>>代码示例>>Java>>正文


Java Bean.getName方法代码示例

本文整理汇总了Java中javax.enterprise.inject.spi.Bean.getName方法的典型用法代码示例。如果您正苦于以下问题:Java Bean.getName方法的具体用法?Java Bean.getName怎么用?Java Bean.getName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.enterprise.inject.spi.Bean的用法示例。


在下文中一共展示了Bean.getName方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: get

import javax.enterprise.inject.spi.Bean; //导入方法依赖的package包/类
@Override
public <T> T get(Contextual<T> contextual) {
    Bean<T> bean = (Bean<T>) contextual;
    String variableName = bean.getName();

    BusinessProcess businessProcess = getBusinessProcess();
    Object variable = businessProcess.getVariable(variableName);
    if (variable != null) {
        if (LOGGER.isDebugEnabled()) {
            if (businessProcess.isAssociated()) {
                LOGGER.debug("Getting instance of bean '{}' from Execution[{}]", variableName, businessProcess.getExecutionId());
            } else {
                LOGGER.debug("Getting instance of bean '{}' from transient bean store", variableName);
            }
        }

        return (T) variable;
    } else {
        return null;
    }

}
 
开发者ID:flowable,项目名称:flowable-engine,代码行数:23,代码来源:BusinessProcessContext.java

示例2: get

import javax.enterprise.inject.spi.Bean; //导入方法依赖的package包/类
@Override
public <T> T get(Contextual<T> contextual) {
  Bean<T> bean = (Bean<T>) contextual;
  String variableName = bean.getName();

  BusinessProcess businessProcess = getBusinessProcess();
  Object variable = businessProcess.getVariable(variableName);
  if (variable != null) {

    if (logger.isLoggable(Level.FINE)) {
      if(businessProcess.isAssociated()) {        
        logger.fine("Getting instance of bean '" + variableName + "' from Execution[" + businessProcess.getExecutionId() + "].");
      } else {
        logger.fine("Getting instance of bean '" + variableName + "' from transient bean store");
      }
    }

    return (T) variable;
  } else {
    return null;
  }

}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:24,代码来源:BusinessProcessContext.java

示例3: registerEventHandlers

import javax.enterprise.inject.spi.Bean; //导入方法依赖的package包/类
private void registerEventHandlers(final X eventStore, final TokenStore tokenStore, Set<Annotation> qualifiers) {
	for (HandlerInfo eventHandlerInfo : eventHandlersInfo) {
		Bean<?> eventHandlerBean = CdiUtils.getBean(getBeanManager(), eventHandlerInfo.getType(), qualifiers);
		if (eventHandlerBean != null) {
			/**
			SubscribingEventProcessor subscribingEventProcessor = new SubscribingEventProcessor(eventHandlerBean.getName() + "SubscribingEventProcessor",
					new SimpleEventHandlerInvoker(CdiUtils.getReference(getBeanManager(), eventHandlerBean, eventHandlerInfo.getType())),
					eventStore);
			subscribingEventProcessor.start();
			*/
			TrackingEventProcessor processor = new TrackingEventProcessor(eventHandlerBean.getName() + "Tracking",
					new SimpleEventHandlerInvoker(CdiUtils.getReference(getBeanManager(), eventHandlerBean, eventHandlerInfo.getType())),
					eventStore,
					tokenStore,
					NoTransactionManager.instance());
			processor.start();
		}
	}
}
 
开发者ID:kamaladafrica,项目名称:axon-cdi,代码行数:20,代码来源:AutoConfiguringEventStoreProducer.java

示例4: get

import javax.enterprise.inject.spi.Bean; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
public <T> T get(Contextual<T> contextual) {
  Bean<T> bean = (Bean<T>) contextual;
  String variableName = bean.getName();
  Object variable = getBeanStore().getContextualInstance(variableName);
  if (variable != null) {
    return (T) variable;
  } else {
    return null;
  }
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:12,代码来源:ThreadContext.java


注:本文中的javax.enterprise.inject.spi.Bean.getName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。