use of com.jme3.network.message.SerializerRegistrationsMessage in project jmonkeyengine by jMonkeyEngine.
the class ClientSerializerRegistrationsService method messageReceived.
@Override
public void messageReceived(Client source, Message m) {
// We only wait for one kind of message...
SerializerRegistrationsMessage msg = (SerializerRegistrationsMessage) m;
msg.registerAll();
}
use of com.jme3.network.message.SerializerRegistrationsMessage in project jmonkeyengine by jMonkeyEngine.
the class SerializerRegistrationsMessage method compile.
public static void compile() {
// Let's just see what they are here
List<Registration> list = new ArrayList<Registration>();
for (SerializerRegistration reg : Serializer.getSerializerRegistrations()) {
Class type = reg.getType();
if (ignore.contains(type))
continue;
if (type.isPrimitive())
continue;
list.add(new Registration(reg));
}
if (log.isLoggable(Level.FINE)) {
log.log(Level.FINE, "Number of registered classes:{0}", list.size());
for (Registration reg : list) {
log.log(Level.FINE, " {0}", reg);
}
}
compiled = list.toArray(new Registration[list.size()]);
INSTANCE = new SerializerRegistrationsMessage(compiled);
Serializer.setReadOnly(true);
}
Aggregations