package com.softwaremill.session.javadsl;

import com.softwaremill.session.SessionSerializer;
import com.softwaremill.session.SessionSerializer$;
import scala.collection.immutable.Map;

/**
 * Wrapper for session serializers in com.softwaremill.session.SessionSerializer
 */
public final class SessionSerializers {

    public static final SessionSerializer<String, String> StringToStringSessionSerializer = SessionSerializer$.MODULE$.stringToStringSessionSerializer();
    public static final SessionSerializer<Integer, String> IntToStringSessionSerializer = (SessionSerializer<Integer, String>) (SessionSerializer) SessionSerializer$.MODULE$.intToStringSessionSerializer();
    public static final SessionSerializer<Long, String> LongToStringSessionSerializer = (SessionSerializer<Long, String>) (SessionSerializer) SessionSerializer$.MODULE$.longToStringSessionSerializer();
    public static final SessionSerializer<Float, String> FloatToStringSessionSerializer = (SessionSerializer<Float, String>) (SessionSerializer) SessionSerializer$.MODULE$.floatToStringSessionSerializer();
    public static final SessionSerializer<Double, String> DoubleToStringSessionSerializer = (SessionSerializer<Double, String>) (SessionSerializer) SessionSerializer$.MODULE$.doubleToStringSessionSerializer();
    public static final SessionSerializer<Map<String, String>, String> MapToStringSessionSerializer = SessionSerializer$.MODULE$.mapToStringSessionSerializer();

    private SessionSerializers() {
    }

}

@@ -36,16 +36,77 @@
 vadsl;%0A%0A
+import com.softwaremill.session.MultiValueSessionSerializer;%0A
 import c
@@ -211,34 +211,215 @@
 ort 
-scala.collection.immutable
+com.softwaremill.session.converters.MapConverters;%0Aimport scala.collection.JavaConverters;%0Aimport scala.compat.java8.JFunction0;%0Aimport scala.compat.java8.JFunction1;%0Aimport scala.util.Try;%0A%0Aimport java.util
 .Map
@@ -1521,32 +1521,33 @@
 onSerializer();%0A
+%0A
     public stati
@@ -1624,32 +1624,46 @@
 ionSerializer = 
+new MultiValue
 SessionSerialize
@@ -1667,47 +1667,358 @@
 izer
-$.MODULE$.mapToStringSessionSerializer(
+%3C%3E(%0A        (JFunction1%3CMap%3CString, String%3E, scala.collection.immutable.Map%3CString, String%3E%3E) m -%3E MapConverters.toImmutableMap(m),%0A        (JFunction1%3Cscala.collection.immutable.Map%3CString, String%3E, Try%3CMap%3CString, String%3E%3E%3E) v1 -%3E%0A            Try.apply((JFunction0%3CMap%3CString, String%3E%3E) () -%3E JavaConverters.mapAsJavaMapConverter(v1).asJava())%0A    
 );%0A%0A

use a Java Map instead of Scala's one in the javadsl