本文整理汇总了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();