jadex.bridge.service.search.SServiceProvider.getLocalService()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(7.6k)|赞(0)|评价(0)|浏览(119)

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

SServiceProvider.getLocalService介绍

[英]Get one service of a type. (Returns required service proxy).
[中]得到一种类型的服务。(返回所需的服务代理)。

代码示例

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

/**
 *  Get one service of a type.
 *  (Returns required service proxy).
 *  @param type The class.
 *  @return The corresponding service.
 */
public static <T> T getLocalService(final IInternalAccess component, final Class<T> type, final String scope)
{
  return getLocalService(component, type, scope, null, true);
}

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

/**
 *  Get one service of a type.
 *  (Returns required service proxy).
 *  @param component The internal access.
 *  @param type The class.
 *  @return The corresponding service.
 */
public static <T> T getLocalService(final IInternalAccess component, final Class<T> type, final IComponentIdentifier target)
{
  return getLocalService(component, type, target, true);
}

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

/**
 *  Get one service of a type.
 *  (Returns required service proxy).
 *  @param type The class.
 *  @return The corresponding service.
 */
public static <T> T getLocalService(final IInternalAccess component, final Class<T> type, final String scope, boolean proxy)
{
  return getLocalService(component, type, scope, null, proxy);
}

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

/**
   *  Get the library service
   */
  protected ILibraryService getLibraryService()
  {
    return internalaccess==null? null: SServiceProvider.getLocalService(internalaccess, ILibraryService.class, RequiredServiceInfo.SCOPE_PLATFORM);
  }
}

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

/**
 *  Get the clock.
 *  @return The clock.
 */
public IClockService getClock()
{
  return SServiceProvider.getLocalService(agent, IClockService.class, RequiredServiceInfo.SCOPE_PLATFORM);
}

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

/**
 *  Get one service of a type.
 *  (Returns required service proxy).
 *  @param type The class.
 *  @return The corresponding service.
 */
public static <T> T getLocalService(IComponentIdentifier component, Class<T> type)
{
  return getLocalService(component, type, null);
}

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

/**
 *  Get one service of a type.
 *  (Returns required service proxy).
 *  @param type The class.
 *  @return The corresponding service.
 */
public static <T> T getLocalService(final IInternalAccess component, final ClassInfo type, final String scope)
{
  return getLocalService(component, type, scope, null, true);
}

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

/**
 *  Get one service of a type.
 *  (Returns required service proxy).
 *  @param component The internal access.
 *  @param type The class.
 *  @return The corresponding service.
 */
public static <T> T getLocalService(final IInternalAccess component, final ClassInfo type, final String scope, final IFilter<T> filter)
{
  return getLocalService(component, type, scope, filter, true);
}

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

/**
 *  Get one service of a type.
 *  (Returns required service proxy).
 *  @param type The class.
 *  @return The corresponding service.
 */
public static <T> T getLocalService(IComponentIdentifier component, Class<T> type, final String scope)
{
  return getLocalService(component, type, scope, null);
}

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

/**
 *  Get one service of a type.
 *  (Returns required service proxy).
 *  @param component The internal access.
 *  @param type The class.
 *  @return The corresponding service.
 */
public static <T> T getLocalService(final IInternalAccess component, final Class<T> type, final String scope, final IFilter<T> filter)
{
  return getLocalService(component, type, scope, filter, true);
}

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

/**
 *  Get one service of a type.
 *  (Returns required service proxy).
 *  @param type The class.
 *  @return The corresponding service.
 */
public static <T> T getLocalService(final IInternalAccess component, final ClassInfo type, final String scope, boolean proxy)
{
  return getLocalService(component, type, scope, null, proxy);
}

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

/**
 *  Get one service of a type. 
 *  (Returns required service proxy).
 *  @param type The class.
 *  @return The corresponding service.
 */
public static <T> T getLocalService(final IInternalAccess component, final Class<T> type)
{
  return getLocalService(component, type, (String)null, true);
}

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

/**
 *  Get one service of a type.
 *  (Returns required service proxy).
 *  @param type The class.
 *  @return The corresponding service.
 */
public static <T> T getLocalService(IComponentIdentifier component, ClassInfo type)
{
  return getLocalService(component, type, null);
}

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

/**
 *  Get one service of a type.
 *  (Returns required service proxy).
 *  @param component The internal access.
 *  @param type The class.
 *  @return The corresponding service.
 */
public static <T> T getLocalService(final IInternalAccess component, final ClassInfo type, final IComponentIdentifier target)
{
  return getLocalService(component, type, target, true);
}

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

/**
 *  Get one service of a type. 
 *  (Returns required service proxy).
 *  @param type The class.
 *  @return The corresponding service.
 */
public static <T> T getLocalService(final IInternalAccess component, final ClassInfo type, boolean proxy)
{
  return getLocalService(component, type, (String)null, proxy);
}

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

/**
 *  Get the current time.
 *  The time unit depends on the currently running clock implementation.
 *  For the default system clock, the time value adheres to the time
 *  representation as used by {@link System#currentTimeMillis()}, i.e.,
 *  the value of milliseconds passed since 0:00 'o clock, January 1st, 1970, UTC.
 *  For custom simulation clocks, arbitrary representations can be used.
 *  @return The current time.
 */
public long getTime()
{
  return SServiceProvider.getLocalService(agent, IClockService.class, RequiredServiceInfo.SCOPE_PLATFORM).getTime();
}

代码示例来源:origin: org.activecomponents.jadex/jadex-applications-bdiv3

/**
   * 
   */
  protected long getTime()
  {
    IClockService cs = SServiceProvider.getLocalService(capa.getAgent(), IClockService.class, RequiredServiceInfo.SCOPE_PLATFORM);
    // todo: capa.getAgent().getComponentFeature().getRequiredService() does not work in init expressions only from plans :-(
//        IClockService cs =  (IClockService)capa.getAgent().getComponentFeature(IRequiredServicesFeature.class).getRequiredService("clockser").get();
    return cs.getTime();
  }

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

/**
 *  Get the current time.
 *  The time unit depends on the currently running clock implementation.
 *  For the default system clock, the time value adheres to the time
 *  representation as used by {@link System#currentTimeMillis()}, i.e.,
 *  the value of milliseconds passed since 0:00 'o clock, January 1st, 1970, UTC.
 *  For custom simulation clocks, arbitrary representations can be used.
 *  @return The current time.
 */
public long getTime()
{
  return SServiceProvider.getLocalService(getComponent(), IClockService.class, RequiredServiceInfo.SCOPE_PLATFORM).getTime();
}

代码示例来源:origin: org.activecomponents.jadex/jadex-applications-bpmn

/**
 *  Execute the task.
 */
public IFuture<Void> execute(final ITaskContext context, final IInternalAccess process)
{
  final Future<Void> ret = new Future<Void>();
  IClockService clock = SServiceProvider.getLocalService(process, IClockService.class, RequiredServiceInfo.SCOPE_PLATFORM);
  context.setParameterValue("time", Long.valueOf(clock.getTime()));
  return ret;
}

代码示例来源:origin: org.activecomponents.jadex/jadex-applications-bdiv3

public IFuture<Void> execute(IInternalAccess ia)
  {
    long cur = SServiceProvider.getLocalService(ia, IClockService.class, RequiredServiceInfo.SCOPE_PLATFORM).getTime();
    al.setTime(new Time(new Date(cur)));
    setAlarm(al);
    return IFuture.DONE;
  }
});

相关文章