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); }
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); }
public void close() { if (server != null && server.isRunning()) { // Close the client connections gracefully for (HostedConnection conn : server.getConnections()) { conn.close("Server closing!"); } server.close(); // FIXME: Really, I'm sure this is not meant to be // https://hub.jmonkeyengine.org/t/solved-for-now-serializer-locked-error-what-does-it-mean-version-jme-3-1/33671 Serializer.setReadOnly(false); } }