Java 类org.apache.zookeeper.server.jersey.ZooKeeperService 实例源码

项目:fuck_zookeeper    文件:ZNodeResource.java   
public ZNodeResource(@DefaultValue("") @QueryParam("session") String session,
        @Context UriInfo ui,
        @Context HttpServletRequest request
        )
        throws IOException {

    String contextPath = request.getContextPath();
    if (contextPath.equals("")) {
        contextPath = "/";
    }
    if (session.equals("")) {
        session = null;
    } else if (!ZooKeeperService.isConnected(contextPath, session)) {
        throw new WebApplicationException(Response.status(
                Response.Status.UNAUTHORIZED).build());
    }
    zk = ZooKeeperService.getClient(contextPath, session);
}
项目:https-github.com-apache-zookeeper    文件:ZNodeResource.java   
public ZNodeResource(@DefaultValue("") @QueryParam("session") String session,
        @Context UriInfo ui,
        @Context HttpServletRequest request
        )
        throws IOException {

    String contextPath = request.getContextPath();
    if (contextPath.equals("")) {
        contextPath = "/";
    }
    if (session.equals("")) {
        session = null;
    } else if (!ZooKeeperService.isConnected(contextPath, session)) {
        throw new WebApplicationException(Response.status(
                Response.Status.UNAUTHORIZED).build());
    }
    zk = ZooKeeperService.getClient(contextPath, session);
}
项目:ZooKeeper    文件:ZNodeResource.java   
public ZNodeResource(@DefaultValue("") @QueryParam("session") String session,
        @Context UriInfo ui,
        @Context HttpServletRequest request
        )
        throws IOException {

    String contextPath = request.getContextPath();
    if (contextPath.equals("")) {
        contextPath = "/";
    }
    if (session.equals("")) {
        session = null;
    } else if (!ZooKeeperService.isConnected(contextPath, session)) {
        throw new WebApplicationException(Response.status(
                Response.Status.UNAUTHORIZED).build());
    }
    zk = ZooKeeperService.getClient(contextPath, session);
}
项目:StreamProcessingInfrastructure    文件:ZNodeResource.java   
public ZNodeResource(@DefaultValue("") @QueryParam("session") String session,
        @Context UriInfo ui,
        @Context HttpServletRequest request
        )
        throws IOException {

    String contextPath = request.getContextPath();
    if (contextPath.equals("")) {
        contextPath = "/";
    }
    if (session.equals("")) {
        session = null;
    } else if (!ZooKeeperService.isConnected(contextPath, session)) {
        throw new WebApplicationException(Response.status(
                Response.Status.UNAUTHORIZED).build());
    }
    zk = ZooKeeperService.getClient(contextPath, session);
}
项目:bigstreams    文件:ZNodeResource.java   
public ZNodeResource(@DefaultValue("") @QueryParam("session") String session,
        @Context UriInfo ui,
        @Context HttpServletRequest request
        )
        throws IOException {

    String contextPath = request.getContextPath();
    if (contextPath.equals("")) {
        contextPath = "/";
    }
    if (session.equals("")) {
        session = null;
    } else if (!ZooKeeperService.isConnected(contextPath, session)) {
        throw new WebApplicationException(Response.status(
                Response.Status.UNAUTHORIZED).build());
    }
    zk = ZooKeeperService.getClient(contextPath, session);
}
项目:bigstreams    文件:ZNodeResource.java   
public ZNodeResource(@DefaultValue("") @QueryParam("session") String session,
        @Context UriInfo ui,
        @Context HttpServletRequest request
        )
        throws IOException {

    String contextPath = request.getContextPath();
    if (contextPath.equals("")) {
        contextPath = "/";
    }
    if (session.equals("")) {
        session = null;
    } else if (!ZooKeeperService.isConnected(contextPath, session)) {
        throw new WebApplicationException(Response.status(
                Response.Status.UNAUTHORIZED).build());
    }
    zk = ZooKeeperService.getClient(contextPath, session);
}
项目:SecureKeeper    文件:ZNodeResource.java   
public ZNodeResource(@DefaultValue("") @QueryParam("session") String session,
        @Context UriInfo ui,
        @Context HttpServletRequest request
        )
        throws IOException {

    String contextPath = request.getContextPath();
    if (contextPath.equals("")) {
        contextPath = "/";
    }
    if (session.equals("")) {
        session = null;
    } else if (!ZooKeeperService.isConnected(contextPath, session)) {
        throw new WebApplicationException(Response.status(
                Response.Status.UNAUTHORIZED).build());
    }
    zk = ZooKeeperService.getClient(contextPath, session);
}
项目:SecureKeeper    文件:ZNodeResource.java   
public ZNodeResource(@DefaultValue("") @QueryParam("session") String session,
        @Context UriInfo ui,
        @Context HttpServletRequest request
        )
        throws IOException {

    String contextPath = request.getContextPath();
    if (contextPath.equals("")) {
        contextPath = "/";
    }
    if (session.equals("")) {
        session = null;
    } else if (!ZooKeeperService.isConnected(contextPath, session)) {
        throw new WebApplicationException(Response.status(
                Response.Status.UNAUTHORIZED).build());
    }
    zk = ZooKeeperService.getClient(contextPath, session);
}
项目:StreamBench    文件:ZNodeResource.java   
public ZNodeResource(@DefaultValue("") @QueryParam("session") String session,
        @Context UriInfo ui,
        @Context HttpServletRequest request
        )
        throws IOException {

    String contextPath = request.getContextPath();
    if (contextPath.equals("")) {
        contextPath = "/";
    }
    if (session.equals("")) {
        session = null;
    } else if (!ZooKeeperService.isConnected(contextPath, session)) {
        throw new WebApplicationException(Response.status(
                Response.Status.UNAUTHORIZED).build());
    }
    zk = ZooKeeperService.getClient(contextPath, session);
}
项目:LoadBalanced_zk    文件:ZNodeResource.java   
public ZNodeResource(@DefaultValue("") @QueryParam("session") String session,
        @Context UriInfo ui,
        @Context HttpServletRequest request
        )
        throws IOException {

    String contextPath = request.getContextPath();
    if (contextPath.equals("")) {
        contextPath = "/";
    }
    if (session.equals("")) {
        session = null;
    } else if (!ZooKeeperService.isConnected(contextPath, session)) {
        throw new WebApplicationException(Response.status(
                Response.Status.UNAUTHORIZED).build());
    }
    zk = ZooKeeperService.getClient(contextPath, session);
}
项目:LoadBalanced_zk    文件:ZNodeResource.java   
public ZNodeResource(@DefaultValue("") @QueryParam("session") String session,
        @Context UriInfo ui,
        @Context HttpServletRequest request
        )
        throws IOException {

    String contextPath = request.getContextPath();
    if (contextPath.equals("")) {
        contextPath = "/";
    }
    if (session.equals("")) {
        session = null;
    } else if (!ZooKeeperService.isConnected(contextPath, session)) {
        throw new WebApplicationException(Response.status(
                Response.Status.UNAUTHORIZED).build());
    }
    zk = ZooKeeperService.getClient(contextPath, session);
}
项目:zookeeper-pkg    文件:ZNodeResource.java   
public ZNodeResource(@DefaultValue("") @QueryParam("session") String session,
        @Context UriInfo ui,
        @Context HttpServletRequest request
        )
        throws IOException {

    String contextPath = request.getContextPath();
    if (contextPath.equals("")) {
        contextPath = "/";
    }
    if (session.equals("")) {
        session = null;
    } else if (!ZooKeeperService.isConnected(contextPath, session)) {
        throw new WebApplicationException(Response.status(
                Response.Status.UNAUTHORIZED).build());
    }
    zk = ZooKeeperService.getClient(contextPath, session);
}
项目:fuck_zookeeper    文件:SessionsResource.java   
@PUT
@Produces( { MediaType.APPLICATION_JSON, "application/javascript",
        MediaType.APPLICATION_XML })
@Consumes(MediaType.APPLICATION_OCTET_STREAM)
public Response keepAliveSession(@PathParam("session") String session,
        @Context UriInfo ui, byte[] data) {

    if (!ZooKeeperService.isConnected(contextPath, session)) {
        throwNotFound(session, ui);
    }

    ZooKeeperService.resetTimer(contextPath, session);
    return Response.status(Response.Status.OK).build();
}
项目:fuck_zookeeper    文件:SessionsResource.java   
@DELETE
@Produces( { MediaType.APPLICATION_JSON, "application/javascript",
        MediaType.APPLICATION_XML, MediaType.APPLICATION_OCTET_STREAM })
public void deleteSession(@PathParam("session") String session,
        @Context UriInfo ui) {
    ZooKeeperService.close(contextPath, session);
}
项目:https-github.com-apache-zookeeper    文件:SessionsResource.java   
@PUT
@Produces( { MediaType.APPLICATION_JSON, "application/javascript",
        MediaType.APPLICATION_XML })
@Consumes(MediaType.APPLICATION_OCTET_STREAM)
public Response keepAliveSession(@PathParam("session") String session,
        @Context UriInfo ui, byte[] data) {

    if (!ZooKeeperService.isConnected(contextPath, session)) {
        throwNotFound(session, ui);
    }

    ZooKeeperService.resetTimer(contextPath, session);
    return Response.status(Response.Status.OK).build();
}
项目:https-github.com-apache-zookeeper    文件:SessionsResource.java   
@DELETE
@Produces( { MediaType.APPLICATION_JSON, "application/javascript",
        MediaType.APPLICATION_XML, MediaType.APPLICATION_OCTET_STREAM })
public void deleteSession(@PathParam("session") String session,
        @Context UriInfo ui) {
    ZooKeeperService.close(contextPath, session);
}
项目:ZooKeeper    文件:SessionsResource.java   
@PUT
@Produces( { MediaType.APPLICATION_JSON, "application/javascript",
        MediaType.APPLICATION_XML })
@Consumes(MediaType.APPLICATION_OCTET_STREAM)
public Response keepAliveSession(@PathParam("session") String session,
        @Context UriInfo ui, byte[] data) {

    if (!ZooKeeperService.isConnected(contextPath, session)) {
        throwNotFound(session, ui);
    }

    ZooKeeperService.resetTimer(contextPath, session);
    return Response.status(Response.Status.OK).build();
}
项目:ZooKeeper    文件:SessionsResource.java   
@DELETE
@Produces( { MediaType.APPLICATION_JSON, "application/javascript",
        MediaType.APPLICATION_XML, MediaType.APPLICATION_OCTET_STREAM })
public void deleteSession(@PathParam("session") String session,
        @Context UriInfo ui) {
    ZooKeeperService.close(contextPath, session);
}
项目:StreamProcessingInfrastructure    文件:SessionsResource.java   
@PUT
@Produces( { MediaType.APPLICATION_JSON, "application/javascript",
        MediaType.APPLICATION_XML })
@Consumes(MediaType.APPLICATION_OCTET_STREAM)
public Response keepAliveSession(@PathParam("session") String session,
        @Context UriInfo ui, byte[] data) {

    if (!ZooKeeperService.isConnected(contextPath, session)) {
        throwNotFound(session, ui);
    }

    ZooKeeperService.resetTimer(contextPath, session);
    return Response.status(Response.Status.OK).build();
}
项目:StreamProcessingInfrastructure    文件:SessionsResource.java   
@DELETE
@Produces( { MediaType.APPLICATION_JSON, "application/javascript",
        MediaType.APPLICATION_XML, MediaType.APPLICATION_OCTET_STREAM })
public void deleteSession(@PathParam("session") String session,
        @Context UriInfo ui) {
    ZooKeeperService.close(contextPath, session);
}
项目:bigstreams    文件:SessionsResource.java   
@PUT
@Produces( { MediaType.APPLICATION_JSON, "application/javascript",
        MediaType.APPLICATION_XML })
@Consumes(MediaType.APPLICATION_OCTET_STREAM)
public Response keepAliveSession(@PathParam("session") String session,
        @Context UriInfo ui, byte[] data) {

    if (!ZooKeeperService.isConnected(contextPath, session)) {
        throwNotFound(session, ui);
    }

    ZooKeeperService.resetTimer(contextPath, session);
    return Response.status(Response.Status.OK).build();
}
项目:bigstreams    文件:SessionsResource.java   
@DELETE
@Produces( { MediaType.APPLICATION_JSON, "application/javascript",
        MediaType.APPLICATION_XML, MediaType.APPLICATION_OCTET_STREAM })
public void deleteSession(@PathParam("session") String session,
        @Context UriInfo ui) {
    ZooKeeperService.close(contextPath, session);
}
项目:bigstreams    文件:SessionsResource.java   
@PUT
@Produces( { MediaType.APPLICATION_JSON, "application/javascript",
        MediaType.APPLICATION_XML })
@Consumes(MediaType.APPLICATION_OCTET_STREAM)
public Response keepAliveSession(@PathParam("session") String session,
        @Context UriInfo ui, byte[] data) {

    if (!ZooKeeperService.isConnected(contextPath, session)) {
        throwNotFound(session, ui);
    }

    ZooKeeperService.resetTimer(contextPath, session);
    return Response.status(Response.Status.OK).build();
}
项目:bigstreams    文件:SessionsResource.java   
@DELETE
@Produces( { MediaType.APPLICATION_JSON, "application/javascript",
        MediaType.APPLICATION_XML, MediaType.APPLICATION_OCTET_STREAM })
public void deleteSession(@PathParam("session") String session,
        @Context UriInfo ui) {
    ZooKeeperService.close(contextPath, session);
}
项目:SecureKeeper    文件:SessionsResource.java   
@PUT
@Produces( { MediaType.APPLICATION_JSON, "application/javascript",
        MediaType.APPLICATION_XML })
@Consumes(MediaType.APPLICATION_OCTET_STREAM)
public Response keepAliveSession(@PathParam("session") String session,
        @Context UriInfo ui, byte[] data) {

    if (!ZooKeeperService.isConnected(contextPath, session)) {
        throwNotFound(session, ui);
    }

    ZooKeeperService.resetTimer(contextPath, session);
    return Response.status(Response.Status.OK).build();
}
项目:SecureKeeper    文件:SessionsResource.java   
@DELETE
@Produces( { MediaType.APPLICATION_JSON, "application/javascript",
        MediaType.APPLICATION_XML, MediaType.APPLICATION_OCTET_STREAM })
public void deleteSession(@PathParam("session") String session,
        @Context UriInfo ui) {
    ZooKeeperService.close(contextPath, session);
}
项目:SecureKeeper    文件:SessionsResource.java   
@PUT
@Produces( { MediaType.APPLICATION_JSON, "application/javascript",
        MediaType.APPLICATION_XML })
@Consumes(MediaType.APPLICATION_OCTET_STREAM)
public Response keepAliveSession(@PathParam("session") String session,
        @Context UriInfo ui, byte[] data) {

    if (!ZooKeeperService.isConnected(contextPath, session)) {
        throwNotFound(session, ui);
    }

    ZooKeeperService.resetTimer(contextPath, session);
    return Response.status(Response.Status.OK).build();
}
项目:SecureKeeper    文件:SessionsResource.java   
@DELETE
@Produces( { MediaType.APPLICATION_JSON, "application/javascript",
        MediaType.APPLICATION_XML, MediaType.APPLICATION_OCTET_STREAM })
public void deleteSession(@PathParam("session") String session,
        @Context UriInfo ui) {
    ZooKeeperService.close(contextPath, session);
}
项目:StreamBench    文件:SessionsResource.java   
@PUT
@Produces( { MediaType.APPLICATION_JSON, "application/javascript",
        MediaType.APPLICATION_XML })
@Consumes(MediaType.APPLICATION_OCTET_STREAM)
public Response keepAliveSession(@PathParam("session") String session,
        @Context UriInfo ui, byte[] data) {

    if (!ZooKeeperService.isConnected(contextPath, session)) {
        throwNotFound(session, ui);
    }

    ZooKeeperService.resetTimer(contextPath, session);
    return Response.status(Response.Status.OK).build();
}
项目:StreamBench    文件:SessionsResource.java   
@DELETE
@Produces( { MediaType.APPLICATION_JSON, "application/javascript",
        MediaType.APPLICATION_XML, MediaType.APPLICATION_OCTET_STREAM })
public void deleteSession(@PathParam("session") String session,
        @Context UriInfo ui) {
    ZooKeeperService.close(contextPath, session);
}
项目:LoadBalanced_zk    文件:SessionsResource.java   
@PUT
@Produces( { MediaType.APPLICATION_JSON, "application/javascript",
        MediaType.APPLICATION_XML })
@Consumes(MediaType.APPLICATION_OCTET_STREAM)
public Response keepAliveSession(@PathParam("session") String session,
        @Context UriInfo ui, byte[] data) {

    if (!ZooKeeperService.isConnected(contextPath, session)) {
        throwNotFound(session, ui);
    }

    ZooKeeperService.resetTimer(contextPath, session);
    return Response.status(Response.Status.OK).build();
}
项目:LoadBalanced_zk    文件:SessionsResource.java   
@DELETE
@Produces( { MediaType.APPLICATION_JSON, "application/javascript",
        MediaType.APPLICATION_XML, MediaType.APPLICATION_OCTET_STREAM })
public void deleteSession(@PathParam("session") String session,
        @Context UriInfo ui) {
    ZooKeeperService.close(contextPath, session);
}
项目:LoadBalanced_zk    文件:SessionsResource.java   
@PUT
@Produces( { MediaType.APPLICATION_JSON, "application/javascript",
        MediaType.APPLICATION_XML })
@Consumes(MediaType.APPLICATION_OCTET_STREAM)
public Response keepAliveSession(@PathParam("session") String session,
        @Context UriInfo ui, byte[] data) {

    if (!ZooKeeperService.isConnected(contextPath, session)) {
        throwNotFound(session, ui);
    }

    ZooKeeperService.resetTimer(contextPath, session);
    return Response.status(Response.Status.OK).build();
}
项目:LoadBalanced_zk    文件:SessionsResource.java   
@DELETE
@Produces( { MediaType.APPLICATION_JSON, "application/javascript",
        MediaType.APPLICATION_XML, MediaType.APPLICATION_OCTET_STREAM })
public void deleteSession(@PathParam("session") String session,
        @Context UriInfo ui) {
    ZooKeeperService.close(contextPath, session);
}
项目:zookeeper-pkg    文件:SessionsResource.java   
@PUT
@Produces( { MediaType.APPLICATION_JSON, "application/javascript",
        MediaType.APPLICATION_XML })
@Consumes(MediaType.APPLICATION_OCTET_STREAM)
public Response keepAliveSession(@PathParam("session") String session,
        @Context UriInfo ui, byte[] data) {

    if (!ZooKeeperService.isConnected(contextPath, session)) {
        throwNotFound(session, ui);
    }

    ZooKeeperService.resetTimer(contextPath, session);
    return Response.status(Response.Status.OK).build();
}
项目:zookeeper-pkg    文件:SessionsResource.java   
@DELETE
@Produces( { MediaType.APPLICATION_JSON, "application/javascript",
        MediaType.APPLICATION_XML, MediaType.APPLICATION_OCTET_STREAM })
public void deleteSession(@PathParam("session") String session,
        @Context UriInfo ui) {
    ZooKeeperService.close(contextPath, session);
}
项目:zookeeper.dsc    文件:ZNodeResource.java   
public ZNodeResource(@Context UriInfo ui) throws IOException {
    zk = ZooKeeperService.getClient(ui.getBaseUri().toString());
}