throws DeploymentException {
ClientEndpoint annotation =
pojo.getClass().getAnnotation(ClientEndpoint.class);
if (annotation == null) {
throw new DeploymentException(
sm.getString("wsWebSocketContainer.missingAnnotation",
pojo.getClass().getName()));
}
Endpoint ep = new PojoEndpointClient(pojo, annotation.decoders());
Class<? extends ClientEndpointConfig.Configurator> configuratorClazz =
pojo.getClass().getAnnotation(
ClientEndpoint.class).configurator();
ClientEndpointConfig.Configurator configurator = null;
if (!ClientEndpointConfig.Configurator.class.equals(
configuratorClazz)) {
try {
configurator = configuratorClazz.newInstance();
} catch (InstantiationException | IllegalAccessException e) {
throw new DeploymentException(sm.getString(
"wsWebSocketContainer.defaultConfiguratorFail"), e);
}
}
ClientEndpointConfig.Builder builder = ClientEndpointConfig.Builder.create();