@GET
@Path("/{ccid: [A-Z,a-z,0-9,_,\\-,\\.]+}")
@Produces({ MediaType.APPLICATION_JSON })
@Suspend(resumeOnBroadcast = true, period = ChannelServiceConstants.EXPIRE_TIME_CONNECTION,
timeUnit = TimeUnit.SECONDS, contentType = MediaType.APPLICATION_JSON)
public Broadcastable open(@PathParam("ccid") String ccid,
@HeaderParam("X-Cache-Index") Integer cacheIndex,
@HeaderParam(ChannelServiceConstants.X_ATMOSPHERE_TRACKING_ID) String atmosphereTrackingId) {
try {
return channelService.openChannel(ccid, cacheIndex, atmosphereTrackingId);
} catch (WebApplicationException e) {
throw e;
} catch (Exception e) {
log.error("GET Channels open long poll ccid: error: {}", e.getMessage(), e);
throw new WebApplicationException(Status.INTERNAL_SERVER_ERROR);
}
}