@Override public void onOpen(Session session, EndpointConfig endpointConfig) { ServerEndpointConfig sec = (ServerEndpointConfig) endpointConfig; Object pojo; try { pojo = sec.getConfigurator().getEndpointInstance( sec.getEndpointClass()); } catch (InstantiationException e) { throw new IllegalArgumentException(sm.getString( "pojoEndpointServer.getPojoInstanceFail", sec.getEndpointClass().getName()), e); } setPojo(pojo); @SuppressWarnings("unchecked") Map<String,String> pathParameters = (Map<String, String>) sec.getUserProperties().get( POJO_PATH_PARAM_KEY); setPathParameters(pathParameters); PojoMethodMapping methodMapping = (PojoMethodMapping) sec.getUserProperties().get( POJO_METHOD_MAPPING_KEY); setMethodMapping(methodMapping); doOnOpen(session, endpointConfig); } }
clazz); } else { ep = new PojoEndpointServer();
clazz); } else { ep = new PojoEndpointServer();
@Override public void onOpen(Session session, EndpointConfig endpointConfig) { ServerEndpointConfig sec = (ServerEndpointConfig) endpointConfig; Object pojo; try { pojo = sec.getConfigurator().getEndpointInstance( sec.getEndpointClass()); } catch (InstantiationException e) { throw new IllegalArgumentException(sm.getString( "pojoEndpointServer.getPojoInstanceFail", sec.getEndpointClass().getName()), e); } setPojo(pojo); @SuppressWarnings("unchecked") Map<String,String> pathParameters = (Map<String, String>) sec.getUserProperties().get( Constants.POJO_PATH_PARAM_KEY); setPathParameters(pathParameters); PojoMethodMapping methodMapping = (PojoMethodMapping) sec.getUserProperties().get( Constants.POJO_METHOD_MAPPING_KEY); setMethodMapping(methodMapping); doOnOpen(session, endpointConfig); } }
clazz); } else { ep = new PojoEndpointServer();
@Override public void onOpen(Session session, EndpointConfig endpointConfig) { ServerEndpointConfig sec = (ServerEndpointConfig) endpointConfig; Object pojo; try { pojo = sec.getConfigurator().getEndpointInstance( sec.getEndpointClass()); } catch (InstantiationException e) { throw new IllegalArgumentException(sm.getString( "pojoEndpointServer.getPojoInstanceFail", sec.getEndpointClass().getName()), e); } setPojo(pojo); @SuppressWarnings("unchecked") Map<String,String> pathParameters = (Map<String, String>) sec.getUserProperties().get( Constants.POJO_PATH_PARAM_KEY); setPathParameters(pathParameters); PojoMethodMapping methodMapping = (PojoMethodMapping) sec.getUserProperties().get( Constants.POJO_METHOD_MAPPING_KEY); setMethodMapping(methodMapping); doOnOpen(session, endpointConfig); } }
clazz); } else { ep = new PojoEndpointServer();
@Override public void onOpen(Session session, EndpointConfig endpointConfig) { ServerEndpointConfig sec = (ServerEndpointConfig) endpointConfig; Object pojo; try { pojo = sec.getConfigurator().getEndpointInstance( sec.getEndpointClass()); } catch (InstantiationException e) { throw new IllegalArgumentException(sm.getString( "pojoEndpointServer.getPojoInstanceFail", sec.getEndpointClass().getName()), e); } setPojo(pojo); @SuppressWarnings("unchecked") Map<String,String> pathParameters = (Map<String, String>) sec.getUserProperties().get( POJO_PATH_PARAM_KEY); setPathParameters(pathParameters); PojoMethodMapping methodMapping = (PojoMethodMapping) sec.getUserProperties().get( POJO_METHOD_MAPPING_KEY); setMethodMapping(methodMapping); doOnOpen(session, endpointConfig); } }
ep = (Endpoint) sec.getConfigurator().getEndpointInstance(clazz); } else { ep = new PojoEndpointServer();
Thread.currentThread().setContextClassLoader(old); setPojo(pojo); setInstanceHandle(instanceHandle); (Map<String, String>) sec.getUserProperties().get( POJO_PATH_PARAM_KEY); setPathParameters(pathParameters); setMethodMapping(methodMapping); doOnOpen(session, endpointConfig);
clazz); } else { ep = new PojoEndpointServer();