@Override
    public Session connectToServer(Class<?> clazz, URI path) throws DeploymentException, IOException {

        if (clazz == null || path == null) {
            throw new IllegalArgumentException();
        }
        Object theObject = null;
        ClientConnector x = new ClientConnector();

        try {
            theObject = getEndpointInstance(clazz);
        } catch (DeploymentException e) {
            String msg = Tr.formatMessage(tc, "client.connection.error", clazz.toString(), e.getMessage());
            Tr.error(tc, "client.connection.error", clazz.toString(), e.getMessage());
            throw new DeploymentException(msg, e);
        }

        return x.connectAnnotatedClass(theObject, path, this);
    }
@ Override public Session connectToServer ( Class < ? > clazz , URI path ) throws DeploymentException , IOException { if ( clazz == null || path == null ) { throw new IllegalArgumentException ( ) ; } Object theObject = null ; ClientConnector x = new ClientConnector ( ) ; try { theObject = getEndpointInstance ( clazz ) ; } catch ( DeploymentException e ) { String msg = Tr . formatMessage ( tc , "client.connection.error" , clazz . toString ( ) , e . getMessage ( ) ) ; Tr . error ( tc , "client.connection.error" , clazz . toString ( ) , e . getMessage ( ) ) ; throw new DeploymentException ( msg , e ) ; } return x . connectAnnotatedClass ( theObject , path , this ) ; }
/*
(non-Javadoc)

@see javax.websocket.WebSocketContainer#connectToServer(java.lang.Class, java.net.URI)