eclipse/californium.scandium — pull request #15 by sbernard31 (2014-09-16 15:39:13+00:00)
Title: add a way to initiate handshake with different peers using different PSK identity.

In the current implementation, there are 2 way to configure the DTLSConnector : a client or server way.
In a server way, we suppose that connection is always at client initiative.
In a client way, we suppose we use the same PSK identity for all server we need to access.

But there are use cases where we are not a "client" or a "server", but just a peer which could initiate or not connection.
To fix that, we should add a way to register known peers we can connect to. In this way client could use different psk identity and server could initiate connection.

So, I propose to add a function [`String getIdentity(InetSocketAddress inetAddress);`](https://github.com/sbernard31/californium.scandium/blob/psk/src/main/java/org/eclipse/californium/scandium/dtls/pskstore/PskStore.java#L39) to PskStore.
You could see the modification of [ClientHandshaker](https://github.com/sbernard31/californium.scandium/blob/psk/src/main/java/org/eclipse/californium/scandium/dtls/ClientHandshaker.java#L430) and [InMemoryPskStore](https://github.com/sbernard31/californium.scandium/blob/psk/src/main/java/org/eclipse/californium/scandium/dtls/pskstore/InMemoryPskStore.java#L61).
As split between client and server concept is not so clear, I merged the 2 configurations too.