gpt4 book ai didi

org.mule.api.context.WorkManager.execute()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-27 16:27:05 27 4
gpt4 key购买 nike

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

WorkManager.execute介绍

暂无

代码示例

代码示例来源:origin: org.mule.modules/mule-module-http

@Override
  public void onThrowable(final Throwable t)
  {
    workManager.execute(new Runnable()
    {
      @Override
      public void run()
      {
        completionHandler.onFailure((Exception) t);
      }
    });
  }
}

代码示例来源:origin: org.mule.modules/mule-module-http

@Override
public Response onCompleted(final Response response) throws Exception
{
  workManager.execute(new Runnable()
  {
    @Override
    public void run()
    {
      try
      {
        completionHandler.onCompletion(createMuleResponse(response, response.getResponseBodyAsStream()));
      }
      catch (IOException e)
      {
        completionHandler.onFailure(e);
      }
    }
  });
  return null;
}

代码示例来源:origin: org.mule.modules/mule-module-http

public void onThrowable(final Throwable t)
{
  try
  {
    closeOut();
  }
  catch (IOException e)
  {
    // ignore
  }
  if (!handled.getAndSet(true))
  {
    workManager.execute(new Runnable()
    {
      @Override
      public void run()
      {
        completionHandler.onFailure((Exception) t);
      }
    });
  }
}

代码示例来源:origin: org.mule.modules/mule-module-http

private void handleIfNecessary()
  {
    if (!handled.getAndSet(true))
    {
      response = responseBuilder.build();
      workManager.execute(new Runnable()
      {
        @Override
        public void run()
        {
          try
          {
            completionHandler.onCompletion(createMuleResponse(response, input));
          }
          catch (IOException e)
          {
            completionHandler.onFailure(e);
          }
        }
      });
    }
  }
}

代码示例来源:origin: org.mule/mule-core

@Override
public void execute(final Runnable runnable)
{
  try
  {
    workTracker.addWork(runnable);
    delegateHolder.getWorkManager().execute(new TrackeableRunnable(runnable));
  }
  catch (RuntimeException e)
  {
    workTracker.removeWork(runnable);
    throw e;
  }
}

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com