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


Java WorkEvent.getType方法代码示例

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


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

示例1: workAccepted

import javax.resource.spi.work.WorkEvent; //导入方法依赖的package包/类
/**
 * accept work 
 *
 * @param e workEvent
 */
@Override
public void workAccepted(WorkEvent e)
{
   if (e.getType() != WorkEvent.WORK_ACCEPTED)
      fail("Wrong accepted type");
   source = e.getSource();
   work = e.getWork();
   startDuration = e.getStartDuration();
   exception = e.getException();

   if (callbackCount != null)
   {
      synchronized (this)
      {
         callbackCount.setAcceptCount(callbackCount.getAcceptCount() + 1);
      }
   }

   super.workAccepted(e);
}
 
开发者ID:ironjacamar,项目名称:ironjacamar,代码行数:26,代码来源:StatusWorkAdapter.java

示例2: workStarted

import javax.resource.spi.work.WorkEvent; //导入方法依赖的package包/类
/**
 * start work 
 *
 * @param e workEvent
 */
@Override
public void workStarted(WorkEvent e)
{
   if (e.getType() != WorkEvent.WORK_STARTED)
      fail("Wrong started type");

   if (callbackCount != null)
   {
      synchronized (this)
      {
         callbackCount.setStartCount(callbackCount.getStartCount() + 1);
      }
   }

   super.workStarted(e);
}
 
开发者ID:ironjacamar,项目名称:ironjacamar,代码行数:22,代码来源:StatusWorkAdapter.java

示例3: workRejected

import javax.resource.spi.work.WorkEvent; //导入方法依赖的package包/类
/**
 * start work 
 *
 * @param e workEvent
 */
@Override
public void workRejected(WorkEvent e)
{
   if (e.getType() != WorkEvent.WORK_REJECTED)
      fail("Wrong rejected type");

   source = e.getSource();
   work = e.getWork();
   startDuration = e.getStartDuration();
   exception = e.getException();

   if (callbackCount != null)
   {
      synchronized (this)
      {
         callbackCount.setRejectedCount(callbackCount.getRejectedCount() + 1);
      }
   }

   super.workRejected(e);
}
 
开发者ID:ironjacamar,项目名称:ironjacamar,代码行数:27,代码来源:StatusWorkAdapter.java

示例4: workCompleted

import javax.resource.spi.work.WorkEvent; //导入方法依赖的package包/类
/**
 * complete work 
 *
 * @param e workEvent
 */
@Override
public void workCompleted(WorkEvent e)
{
   if (e.getType() != WorkEvent.WORK_COMPLETED)
      fail("Wrong completed type");

   if (callbackCount != null)
   {
      synchronized (this)
      {
         callbackCount.setCompletedCount(callbackCount.getCompletedCount() + 1);
      }
   }

   super.workCompleted(e);
}
 
开发者ID:ironjacamar,项目名称:ironjacamar,代码行数:22,代码来源:StatusWorkAdapter.java

示例5: workStarted

import javax.resource.spi.work.WorkEvent; //导入方法依赖的package包/类
/**
 * start work 
 *
 * @param e workEvent
 */
@Override
public void workStarted(WorkEvent e)
{
   if (e.getType() != WorkEvent.WORK_STARTED)
      fail("Wrong started type");
   timeStarted = System.currentTimeMillis();
   super.workStarted(e);
   Work work = e.getWork();
   if (work instanceof NestProviderWork)
   {
      NestProviderWork nw = (NestProviderWork) work;
      start.append(nw.getName());
   }

}
 
开发者ID:ironjacamar,项目名称:ironjacamar,代码行数:21,代码来源:ContextWorkAdapter.java

示例6: workRejected

import javax.resource.spi.work.WorkEvent; //导入方法依赖的package包/类
/**
 * start work 
 *
 * @param e workEvent
 */
@Override
public void workRejected(WorkEvent e)
{
   if (e.getType() != WorkEvent.WORK_REJECTED)
      fail("Wrong rejected type");
   timeRejected = System.currentTimeMillis();
   super.workRejected(e);
   Work work = e.getWork();
   if (work instanceof NestProviderWork)
   {
      NestProviderWork nw = (NestProviderWork) work;
      reject.append(nw.getName());
   }

}
 
开发者ID:ironjacamar,项目名称:ironjacamar,代码行数:21,代码来源:ContextWorkAdapter.java

示例7: workCompleted

import javax.resource.spi.work.WorkEvent; //导入方法依赖的package包/类
/**
 * complete work 
 *
 * @param e workEvent
 */
@Override
public void workCompleted(WorkEvent e)
{
   if (e.getType() != WorkEvent.WORK_COMPLETED)
      fail("Wrong completed type");
   timeCompleted = System.currentTimeMillis();
   super.workCompleted(e);
   Work work = e.getWork();
   if (work instanceof NestProviderWork)
   {
      NestProviderWork nw = (NestProviderWork) work;
      done.append(nw.getName());
      exception = e.getException();
   }

}
 
开发者ID:ironjacamar,项目名称:ironjacamar,代码行数:22,代码来源:ContextWorkAdapter.java

示例8: workAccepted

import javax.resource.spi.work.WorkEvent; //导入方法依赖的package包/类
/**
 * accept work 
 *
 * @param e workEvent
 */
@Override
public void workAccepted(WorkEvent e)
{
   if (e.getType() != WorkEvent.WORK_ACCEPTED)
      fail("Wrong accepted type");
   timeAccepted = System.currentTimeMillis();
   super.workAccepted(e);
}
 
开发者ID:ironjacamar,项目名称:ironjacamar,代码行数:14,代码来源:ContextWorkAdapter.java


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