本文整理匯總了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;
}
示例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;
}
});
}
示例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());
}
示例4: createEventsCmdExec
import com.github.dockerjava.api.command.EventsCmd; //導入依賴的package包/類
@Override
public EventsCmd.Exec createEventsCmdExec() {
return new EventsCmdExec(getBaseResource(), getDockerClientConfig());
}
示例5: eventsCmd
import com.github.dockerjava.api.command.EventsCmd; //導入依賴的package包/類
@Override
public EventsCmd eventsCmd() {
return new EventsCmdImpl(getDockerCmdExecFactory().createEventsCmdExec());
}
示例6: EventsCmdImpl
import com.github.dockerjava.api.command.EventsCmd; //導入依賴的package包/類
public EventsCmdImpl(EventsCmd.Exec exec) {
super(exec);
}
示例7: withSince
import com.github.dockerjava.api.command.EventsCmd; //導入依賴的package包/類
@Override
public EventsCmd withSince(String since) {
this.since = since;
return this;
}
示例8: withUntil
import com.github.dockerjava.api.command.EventsCmd; //導入依賴的package包/類
@Override
public EventsCmd withUntil(String until) {
this.until = until;
return this;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例13: createEventsCmdExec
import com.github.dockerjava.api.command.EventsCmd; //導入依賴的package包/類
@Override
public EventsCmd.Exec createEventsCmdExec() {
return delegate.createEventsCmdExec();
}
示例14: eventsCmd
import com.github.dockerjava.api.command.EventsCmd; //導入依賴的package包/類
EventsCmd eventsCmd();