jadex.micro.annotation.Agent.keepalive()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(1.2k)|赞(0)|评价(0)|浏览(126)

本文整理了Java中jadex.micro.annotation.Agent.keepalive()方法的一些代码示例,展示了Agent.keepalive()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Agent.keepalive()方法的具体详情如下:
包路径:jadex.micro.annotation.Agent
类名称:Agent
方法名:keepalive

Agent.keepalive介绍

暂无

代码示例

代码示例来源:origin: net.sourceforge.jadex/jadex-kernel-bdiv3

public void customResultAvailable(Tuple2<Method, Object> res)
  {
    // Only end body if future or void and kill is true 
    Boolean found = null;
    
    Method method = res!=null? res.getFirstEntity(): null;
    
    if(method!=null)
    {
      if(SReflect.isSupertype(IFuture.class, method.getReturnType()))
      {
        found = Boolean.TRUE;
      }
      else if(void.class.equals(method.getReturnType()))
      {
        AgentBody ab = method.getAnnotation(AgentBody.class);
        found = ab.keepalive()? Boolean.FALSE: Boolean.TRUE;
      }
    }
    else
    {
      Agent ag = agent.getClass().getAnnotation(Agent.class);
      found = ag.keepalive()? Boolean.FALSE: Boolean.TRUE;
    }
    
    if(found!=null && found.booleanValue())
      ret.setResult(null);
  }
}));

代码示例来源:origin: net.sourceforge.jadex/jadex-kernel-micro

kill = !ag.keepalive();

代码示例来源:origin: org.activecomponents.jadex/jadex-kernel-micro

Boolean    sync    = val.synchronous().toBoolean();
Boolean    persist    = val.persistable().toBoolean();
Boolean    keep    = val.keepalive().toBoolean();

相关文章