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


Java EventsCmd类代码示例

本文整理汇总了Java中com.github.dockerjava.api.command.EventsCmd的典型用法代码示例。如果您正苦于以下问题:Java EventsCmd类的具体用法?Java EventsCmd怎么用?Java EventsCmd使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


EventsCmd类属于com.github.dockerjava.api.command包,在下文中一共展示了EventsCmd类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: execute0

import com.github.dockerjava.api.command.EventsCmd; //导入依赖的package包/类
@Override
protected Void execute0(EventsCmd command, ResultCallback<Event> resultCallback) {

    WebTarget webTarget = getBaseResource().path("/events").queryParam("since", command.getSince())
            .queryParam("until", command.getUntil());

    if (command.getFilters() != null && !command.getFilters().isEmpty()) {
        webTarget = webTarget
                .queryParam("filters", FiltersEncoder.jsonEncode(command.getFilters()));
    }

    LOGGER.trace("GET: {}", webTarget);

    webTarget.request().get(new TypeReference<Event>() {
    }, resultCallback);

    return null;
}
 
开发者ID:docker-java,项目名称:docker-java,代码行数:19,代码来源:EventsCmdExec.java

示例2: setupMocks

import com.github.dockerjava.api.command.EventsCmd; //导入依赖的package包/类
public void setupMocks() {
    Mockito.when(dockerClient.eventsCmd(Matchers.any(EventCallback.class))).thenAnswer(new Answer<EventsCmd>() {
        public EventsCmd answer(InvocationOnMock invocation) {
            Object[] args = invocation.getArguments();
            callback = (EventCallback)args[0];
            return eventsCmd;
        }
    });
    
  
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:12,代码来源:DockerEventsConsumerTest.java

示例3: callbackNotifier

import com.github.dockerjava.api.command.EventsCmd; //导入依赖的package包/类
@Override
protected AbstractCallbackNotifier<Event> callbackNotifier(EventsCmd command, ResultCallback<Event> resultCallback) {
    WebTarget webTarget = getBaseResource().path("/events").queryParam("since", command.getSince())
            .queryParam("until", command.getUntil());

    if (command.getFilters() != null && !command.getFilters().isEmpty()) {
        webTarget = webTarget
                .queryParam("filters", urlPathSegmentEscaper().escape(FiltersEncoder.jsonEncode(command.getFilters())));
    }

    LOGGER.trace("GET: {}", webTarget);

    return new GETCallbackNotifier<Event>(new JsonStreamProcessor<Event>(Event.class), resultCallback,
            webTarget.request());
}
 
开发者ID:docker-java,项目名称:docker-java,代码行数:16,代码来源:EventsCmdExec.java

示例4: createEventsCmdExec

import com.github.dockerjava.api.command.EventsCmd; //导入依赖的package包/类
@Override
public EventsCmd.Exec createEventsCmdExec() {
    return new EventsCmdExec(getBaseResource(), getDockerClientConfig());
}
 
开发者ID:docker-java,项目名称:docker-java,代码行数:5,代码来源:JerseyDockerCmdExecFactory.java

示例5: eventsCmd

import com.github.dockerjava.api.command.EventsCmd; //导入依赖的package包/类
@Override
public EventsCmd eventsCmd() {
    return new EventsCmdImpl(getDockerCmdExecFactory().createEventsCmdExec());
}
 
开发者ID:docker-java,项目名称:docker-java,代码行数:5,代码来源:DockerClientImpl.java

示例6: EventsCmdImpl

import com.github.dockerjava.api.command.EventsCmd; //导入依赖的package包/类
public EventsCmdImpl(EventsCmd.Exec exec) {
    super(exec);
}
 
开发者ID:docker-java,项目名称:docker-java,代码行数:4,代码来源:EventsCmdImpl.java

示例7: withSince

import com.github.dockerjava.api.command.EventsCmd; //导入依赖的package包/类
@Override
public EventsCmd withSince(String since) {
    this.since = since;
    return this;
}
 
开发者ID:docker-java,项目名称:docker-java,代码行数:6,代码来源:EventsCmdImpl.java

示例8: withUntil

import com.github.dockerjava.api.command.EventsCmd; //导入依赖的package包/类
@Override
public EventsCmd withUntil(String until) {
    this.until = until;
    return this;
}
 
开发者ID:docker-java,项目名称:docker-java,代码行数:6,代码来源:EventsCmdImpl.java

示例9: withContainerFilter

import com.github.dockerjava.api.command.EventsCmd; //导入依赖的package包/类
@Override
public EventsCmd withContainerFilter(String... container) {
    checkNotNull(container, "container have not been specified");
    this.filters.withContainers(container);
    return this;
}
 
开发者ID:docker-java,项目名称:docker-java,代码行数:7,代码来源:EventsCmdImpl.java

示例10: withImageFilter

import com.github.dockerjava.api.command.EventsCmd; //导入依赖的package包/类
@Override
public EventsCmd withImageFilter(String... image) {
    checkNotNull(image, "image have not been specified");
    this.filters.withImages(image);
    return this;
}
 
开发者ID:docker-java,项目名称:docker-java,代码行数:7,代码来源:EventsCmdImpl.java

示例11: withEventFilter

import com.github.dockerjava.api.command.EventsCmd; //导入依赖的package包/类
@Override
public EventsCmd withEventFilter(String... event) {
    checkNotNull(event, "event have not been specified");
    this.filters.withFilter("event", event);
    return this;
}
 
开发者ID:docker-java,项目名称:docker-java,代码行数:7,代码来源:EventsCmdImpl.java

示例12: withLabelFilter

import com.github.dockerjava.api.command.EventsCmd; //导入依赖的package包/类
@Override
public EventsCmd withLabelFilter(String... label) {
    checkNotNull(label, "label have not been specified");
    this.filters.withLabels(label);
    return this;
}
 
开发者ID:docker-java,项目名称:docker-java,代码行数:7,代码来源:EventsCmdImpl.java

示例13: createEventsCmdExec

import com.github.dockerjava.api.command.EventsCmd; //导入依赖的package包/类
@Override
public EventsCmd.Exec createEventsCmdExec() {
    return delegate.createEventsCmdExec();
}
 
开发者ID:docker-java,项目名称:docker-java,代码行数:5,代码来源:TestDockerCmdExecFactory.java

示例14: eventsCmd

import com.github.dockerjava.api.command.EventsCmd; //导入依赖的package包/类
EventsCmd eventsCmd(); 
开发者ID:docker-java,项目名称:docker-java,代码行数:2,代码来源:DockerClient.java


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