Package org.glassfish.tyrus.core

Examples of org.glassfish.tyrus.core.TyrusEndpointWrapper


                                    return throwable;
                                }
                            };

                            try {
                                TyrusEndpointWrapper clientEndpoint = new TyrusEndpointWrapper(endpoint, config, componentProvider,
                                        webSocketContainer == null ? ClientManager.this : webSocketContainer, url, null, new TyrusEndpointWrapper.SessionListener() {

                                    @Override
                                    public void onClose(TyrusSession session, CloseReason closeReason) {
                                        if (reconnectHandler.onDisconnect(closeReason)) {
View Full Code Here


    @Override
    public Object createdEndpoint(ServerEndpointRegistration registration, ComponentProviderService provider,
        WebSocketContainer container, TyrusWebSocketEngine engine) throws DeploymentException {

      TyrusEndpointWrapper endpointWrapper = new TyrusEndpointWrapper(registration.getEndpoint(),
          registration, provider, container, "/", registration.getConfigurator());

      return new TyrusEndpoint(endpointWrapper);
    }
View Full Code Here

            public void run() {

                ClientEndpointConfig config;
                Endpoint endpoint;
                final ErrorCollector collector = new ErrorCollector();
                TyrusEndpointWrapper clientEndpoint;

                final CountDownLatch responseLatch = new CountDownLatch(1);
                ClientManagerHandshakeListener listener;
                TyrusClientEngine clientEngine;

                try {
                    if (o instanceof Endpoint) {
                        endpoint = (Endpoint) o;
                        config = configuration == null ? ClientEndpointConfig.Builder.create().build() : configuration;
                    } else if (o instanceof Class) {
                        if (Endpoint.class.isAssignableFrom((Class<?>) o)) {
                            //noinspection unchecked
                            endpoint = ReflectionHelper.getInstance(((Class<Endpoint>) o), collector);
                            config = configuration == null ? ClientEndpointConfig.Builder.create().build() : configuration;
                        } else if ((((Class<?>) o).getAnnotation(ClientEndpoint.class) != null)) {
                            endpoint = AnnotatedEndpoint.fromClass((Class) o, componentProvider, false, collector);
                            config = (ClientEndpointConfig) ((AnnotatedEndpoint) endpoint).getEndpointConfig();
                        } else {
                            collector.addException(new DeploymentException(String.format("Class %s in not Endpoint descendant and does not have @ClientEndpoint", ((Class<?>) o).getName())));
                            endpoint = null;
                            config = null;
                        }
                    } else {
                        endpoint = AnnotatedEndpoint.fromInstance(o, componentProvider, false, collector);
                        config = (ClientEndpointConfig) ((AnnotatedEndpoint) endpoint).getEndpointConfig();
                    }


                    clientEndpoint = new TyrusEndpointWrapper(endpoint, config, componentProvider,
                            webSocketContainer == null ? ClientManager.this : webSocketContainer, url, null);

                    // fail fast when there is some issue with client endpoint.
                    if (!collector.isEmpty()) {
                        future.setFailure(collector.composeComprehensiveException());
View Full Code Here

TOP

Related Classes of org.glassfish.tyrus.core.TyrusEndpointWrapper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.