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