Search in sources :

Example 6 with InMemorySecurityStore

use of org.eclipse.leshan.server.impl.InMemorySecurityStore in project leshan by eclipse.

the class LeshanServerBuilderTest method create_server_with_securityStore_and_disable_secured_endpoint.

@Test
public void create_server_with_securityStore_and_disable_secured_endpoint() {
    builder.setSecurityStore(new InMemorySecurityStore());
    builder.disableSecuredEndpoint();
    server = builder.build();
    assertNull(server.getSecuredAddress());
    assertNotNull(server.getUnsecuredAddress());
}
Also used : InMemorySecurityStore(org.eclipse.leshan.server.impl.InMemorySecurityStore) Test(org.junit.Test)

Example 7 with InMemorySecurityStore

use of org.eclipse.leshan.server.impl.InMemorySecurityStore in project leshan by eclipse.

the class LeshanServerBuilderTest method create_server_with_securityStore_and_disable_unsecured_endpoint.

@Test
public void create_server_with_securityStore_and_disable_unsecured_endpoint() {
    builder.setSecurityStore(new InMemorySecurityStore());
    builder.disableUnsecuredEndpoint();
    server = builder.build();
    assertNotNull(server.getSecuredAddress());
    assertNull(server.getUnsecuredAddress());
}
Also used : InMemorySecurityStore(org.eclipse.leshan.server.impl.InMemorySecurityStore) Test(org.junit.Test)

Aggregations

InMemorySecurityStore (org.eclipse.leshan.server.impl.InMemorySecurityStore)7 InetSocketAddress (java.net.InetSocketAddress)4 LeshanServerBuilder (org.eclipse.leshan.server.californium.LeshanServerBuilder)4 Test (org.junit.Test)3 StaticModelProvider (org.eclipse.leshan.server.model.StaticModelProvider)2 DefaultLwM2mNodeDecoder (org.eclipse.leshan.core.node.codec.DefaultLwM2mNodeDecoder)1 Observation (org.eclipse.leshan.core.observation.Observation)1 RedisRegistrationStore (org.eclipse.leshan.server.cluster.RedisRegistrationStore)1 Registration (org.eclipse.leshan.server.registration.Registration)1 RegistrationListener (org.eclipse.leshan.server.registration.RegistrationListener)1 RegistrationUpdate (org.eclipse.leshan.server.registration.RegistrationUpdate)1 Jedis (redis.clients.jedis.Jedis)1 JedisPool (redis.clients.jedis.JedisPool)1