Package org.eclipse.jetty.websocket.jsr356.metadata

Examples of org.eclipse.jetty.websocket.jsr356.metadata.EndpointMetadata


    @Before
    public void initDecoderFactory()
    {
        DecoderFactory primitivesFactory = new DecoderFactory(PrimitiveDecoderMetadataSet.INSTANCE);
        metadatas = new DecoderMetadataSet();
        factory = new DecoderFactory(metadatas,primitivesFactory);
    }
View Full Code Here


    }
   
    public SimpleEndpointMetadata(Class<? extends Endpoint> endpointClass, EndpointConfig config)
    {
        this.endpointClass = endpointClass;
        this.decoders = new DecoderMetadataSet();
        this.encoders = new EncoderMetadataSet();

        if (config != null)
        {
            this.decoders.addAll(config.getDecoders());
View Full Code Here

    {
        if (LOG.isDebugEnabled())
        {
            LOG.debug("getMetadataFor({})",type);
        }
        EncoderMetadata metadata = metadatas.getMetadataByType(type);

        if (metadata != null)
        {
            return metadata;
        }
View Full Code Here

            }

            if (wrapper == null)
            {
                // Attempt to create Wrapper on demand
                EncoderMetadata metadata = metadatas.getMetadataByType(type);
                if (metadata == null)
                {
                    return null;
                }
                wrapper = newWrapper(metadata);
View Full Code Here

    private EncoderMetadataSet metadatas;
    private EncoderFactory factory;

    private void assertMetadataFor(Class<?> type, Class<? extends Encoder> expectedEncoderClass, MessageType expectedType)
    {
        EncoderMetadata metadata = factory.getMetadataFor(type);
        Assert.assertEquals("metadata.coderClass",metadata.getCoderClass(),expectedEncoderClass);
        Assert.assertThat("metadata.messageType",metadata.getMessageType(),is(expectedType));
        Assert.assertEquals("metadata.objectType",metadata.getObjectType(),type);
    }
View Full Code Here

    protected AnnotatedEndpointMetadata(Class<?> endpointClass)
    {
        this.endpointClass = endpointClass;
        this.decoders = new DecoderMetadataSet();
        this.encoders = new EncoderMetadataSet();
    }
View Full Code Here

    @Before
    public void initEncoderFactory()
    {
        EncoderFactory primitivesFactory = new EncoderFactory(PrimitiveEncoderMetadataSet.INSTANCE);
        metadatas = new EncoderMetadataSet();
        factory = new EncoderFactory(metadatas,primitivesFactory);
    }
View Full Code Here

        this.webSocketServerFactory.addSessionFactory(new JsrSessionFactory(this,this));
    }
   
    public EndpointInstance newClientEndpointInstance(Object endpoint, ServerEndpointConfig config, String path)
    {
        EndpointMetadata metadata = getClientEndpointMetadata(endpoint.getClass(),config);
        ServerEndpointConfig cec = config;
        if (config == null)
        {
            if (metadata instanceof AnnotatedServerEndpointMetadata)
            {
View Full Code Here

        return client;
    }

    public EndpointMetadata getClientEndpointMetadata(Class<?> endpoint, EndpointConfig config)
    {
        EndpointMetadata metadata = null;

        synchronized (endpointClientMetadataCache)
        {
            metadata = endpointClientMetadataCache.get(endpoint);
View Full Code Here

        }
    }

    public EndpointInstance newClientEndpointInstance(Object endpoint, ClientEndpointConfig config)
    {
        EndpointMetadata metadata = getClientEndpointMetadata(endpoint.getClass(),config);
        ClientEndpointConfig cec = config;
        if (config == null)
        {
            if (metadata instanceof AnnotatedClientEndpointMetadata)
            {
View Full Code Here

TOP

Related Classes of org.eclipse.jetty.websocket.jsr356.metadata.EndpointMetadata

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.