當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。