@Override public void resizeTty(final String containerId, final Integer height, final Integer width) throws DockerException, InterruptedException { checkTtyParams(height, width); WebTarget resource = resource().path("containers").path(containerId).path("resize"); if (height != null && height > 0) { resource = resource.queryParam("h", height); } if (width != null && width > 0) { resource = resource.queryParam("w", width); } try { request(POST, resource, resource.request(TEXT_PLAIN_TYPE)); } catch (DockerRequestException e) { switch (e.status()) { case 404: throw new ContainerNotFoundException(containerId, e); default: throw e; } } }
@Override public void execResizeTty(final String execId, final Integer height, final Integer width) throws DockerException, InterruptedException { checkTtyParams(height, width); WebTarget resource = resource().path("exec").path(execId).path("resize"); if (height != null && height > 0) { resource = resource.queryParam("h", height); } if (width != null && width > 0) { resource = resource.queryParam("w", width); } try { request(POST, resource, resource.request(TEXT_PLAIN_TYPE)); } catch (DockerRequestException e) { switch (e.status()) { case 404: throw new ExecNotFoundException(execId, e); default: throw e; } } }
@Override public void execResizeTty(final String execId, final Integer height, final Integer width) throws DockerException, InterruptedException { checkTtyParams(height, width); WebTarget resource = resource().path("exec").path(execId).path("resize"); if (height != null && height > 0) { resource = resource.queryParam("h", height); } if (width != null && width > 0) { resource = resource.queryParam("w", width); } try { request(POST, resource, resource.request(TEXT_PLAIN_TYPE)); } catch (DockerRequestException e) { switch (e.status()) { case 404: throw new ExecNotFoundException(execId, e); default: throw e; } } }
@Override public void resizeTty(final String containerId, final Integer height, final Integer width) throws DockerException, InterruptedException { checkTtyParams(height, width); WebTarget resource = resource().path("containers").path(containerId).path("resize"); if (height != null && height > 0) { resource = resource.queryParam("h", height); } if (width != null && width > 0) { resource = resource.queryParam("w", width); } try { request(POST, resource, resource.request(TEXT_PLAIN_TYPE)); } catch (DockerRequestException e) { switch (e.status()) { case 404: throw new ContainerNotFoundException(containerId, e); default: throw e; } } }