@Test public void unwrap() { performer.onserver(new Action<ServerWebSocket>() { @Override public void on(ServerWebSocket ws) { assertThat(ws.unwrap(AtmosphereResource.class), instanceOf(AtmosphereResource.class)); performer.start(); } }) .connect(); }
@Override public <T> T unwrap(Class<T> clazz) { return AtmosphereResource.class.isAssignableFrom(clazz) ? clazz.cast(resource) : null; }
AtmosphereServerWebSocket extends AbstractServerWebSocket { @Override public <T> T unwrap(Class<T> clazz) { return AtmosphereResource.class.isAssignableFrom(clazz) ? clazz.cast(resource) : null; } }
AtmosphereServerWebSocket extends AbstractServerWebSocket { @Override public <T> T unwrap(Class<T> clazz) { return AtmosphereResource.class.isAssignableFrom(clazz) ? clazz.cast(resource) : null; } AtmosphereServerWebSocket(AtmosphereResource resource); }
AtmosphereServerWebSocket extends AbstractServerWebSocket { @Override public <T> T unwrap(Class<T> clazz) { return AtmosphereResource.class.isAssignableFrom(clazz) ? clazz.cast(resource) : null; } AtmosphereServerWebSocket(AtmosphereResource resource); @Override String uri(); @Override T unwrap(Class<T> clazz); }
AtmosphereServerWebSocket extends AbstractServerWebSocket { @Override public <T> T unwrap(Class<T> clazz) { return AtmosphereResource.class.isAssignableFrom(clazz) ? clazz.cast(resource) : null; } AtmosphereServerWebSocket(AtmosphereResource resource); @Override String uri(); @Override T unwrap(Class<T> clazz);  }