@Override
public Session connectToServer(Class<? extends Endpoint> clazz,
ClientEndpointConfig clientEndpointConfiguration, URI path)
throws DeploymentException {
Endpoint endpoint;
try {
endpoint = clazz.newInstance();
} catch (InstantiationException e) {
throw new DeploymentException(sm.getString(
"wsWebSocketContainer.endpointCreateFail", clazz.getName()),