Package com.esotericsoftware.kryo

Examples of com.esotericsoftware.kryo.Kryo.register()


  // This registers objects that are going to be sent over the network.
  static public void register (EndPoint endPoint) {
    Kryo kryo = endPoint.getKryo();
    kryo.register(RegisterName.class);
    kryo.register(String[].class);
    kryo.register(UpdateNames.class);
    kryo.register(ChatMessage.class);
  }

  static public class RegisterName {
    public String name;
View Full Code Here


  static public void register (EndPoint endPoint) {
    Kryo kryo = endPoint.getKryo();
    kryo.register(RegisterName.class);
    kryo.register(String[].class);
    kryo.register(UpdateNames.class);
    kryo.register(ChatMessage.class);
  }

  static public class RegisterName {
    public String name;
  }
View Full Code Here

        kryo.addDefaultSerializer(Map.Entry.class, new EntrySerializer());
        kryo.setRegistrationRequired(true);
        serializationList.forEach(p -> {
            final Function<Kryo, Serializer> serializer = p.getValue1();
            if (serializer == null)
                kryo.register(p.getValue0(), kryo.getDefaultSerializer(p.getValue0()), p.getValue2());
            else
                kryo.register(p.getValue0(), serializer.apply(kryo), p.getValue2());
        });
        return kryo;
    }
View Full Code Here

        serializationList.forEach(p -> {
            final Function<Kryo, Serializer> serializer = p.getValue1();
            if (serializer == null)
                kryo.register(p.getValue0(), kryo.getDefaultSerializer(p.getValue0()), p.getValue2());
            else
                kryo.register(p.getValue0(), serializer.apply(kryo), p.getValue2());
        });
        return kryo;
    }

    public HeaderWriter getHeaderWriter() {
View Full Code Here

  static public final int port = 54555;

  // This registers objects that are going to be sent over the network.
  static public void register (EndPoint endPoint) {
    Kryo kryo = endPoint.getKryo();
    kryo.register(Login.class);
    kryo.register(RegistrationRequired.class);
    kryo.register(Register.class);
    kryo.register(AddCharacter.class);
    kryo.register(UpdateCharacter.class);
    kryo.register(RemoveCharacter.class);
View Full Code Here

  // This registers objects that are going to be sent over the network.
  static public void register (EndPoint endPoint) {
    Kryo kryo = endPoint.getKryo();
    kryo.register(Login.class);
    kryo.register(RegistrationRequired.class);
    kryo.register(Register.class);
    kryo.register(AddCharacter.class);
    kryo.register(UpdateCharacter.class);
    kryo.register(RemoveCharacter.class);
    kryo.register(Character.class);
View Full Code Here

  // This registers objects that are going to be sent over the network.
  static public void register (EndPoint endPoint) {
    Kryo kryo = endPoint.getKryo();
    kryo.register(Login.class);
    kryo.register(RegistrationRequired.class);
    kryo.register(Register.class);
    kryo.register(AddCharacter.class);
    kryo.register(UpdateCharacter.class);
    kryo.register(RemoveCharacter.class);
    kryo.register(Character.class);
    kryo.register(MoveCharacter.class);
View Full Code Here

  static public void register (EndPoint endPoint) {
    Kryo kryo = endPoint.getKryo();
    kryo.register(Login.class);
    kryo.register(RegistrationRequired.class);
    kryo.register(Register.class);
    kryo.register(AddCharacter.class);
    kryo.register(UpdateCharacter.class);
    kryo.register(RemoveCharacter.class);
    kryo.register(Character.class);
    kryo.register(MoveCharacter.class);
  }
View Full Code Here

    Kryo kryo = endPoint.getKryo();
    kryo.register(Login.class);
    kryo.register(RegistrationRequired.class);
    kryo.register(Register.class);
    kryo.register(AddCharacter.class);
    kryo.register(UpdateCharacter.class);
    kryo.register(RemoveCharacter.class);
    kryo.register(Character.class);
    kryo.register(MoveCharacter.class);
  }
View Full Code Here

    kryo.register(Login.class);
    kryo.register(RegistrationRequired.class);
    kryo.register(Register.class);
    kryo.register(AddCharacter.class);
    kryo.register(UpdateCharacter.class);
    kryo.register(RemoveCharacter.class);
    kryo.register(Character.class);
    kryo.register(MoveCharacter.class);
  }

  static public class Login {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.