PushConfigurationMap extends NodeMap implements PushConfiguration { @Override public void setFallbackTransport(Transport fallbackTransport) { if (fallbackTransport == Transport.WEBSOCKET_XHR) { throw new IllegalArgumentException( "WEBSOCKET_XHR can only be used as primary transport"); } getParameters().put(FALLBACK_TRANSPORT_KEY, fallbackTransport.getIdentifier()); } PushConfigurationMap(StateNode node); @Override void setTransport(Transport transport); @Override Transport getTransport(); @Override void setFallbackTransport(Transport fallbackTransport); @Override Transport getFallbackTransport(); @Override void setPushMode(PushMode pushMode); @Override PushMode getPushMode(); @Override void setPushUrl(String pushUrl); @Override String getPushUrl(); @Override String getParameter(String key); @Override void setParameter(String key, String value); @Override Collection<String> getParameterNames(); @Override void setPushConnectionFactory(PushConnectionFactory factory); static final String TRANSPORT_KEY; static final String FALLBACK_TRANSPORT_KEY; static final String PUSHMODE_KEY; static final String ALWAYS_USE_XHR_TO_SERVER; static final String PUSH_URL_KEY; static final String PARAMETERS_KEY; }
@Test(expected = IllegalArgumentException.class) public void fallbackTransportWebsocketXHR() { ns.setFallbackTransport(Transport.WEBSOCKET_XHR); }