and ClientRegistrationMessage so that they have fixed IDs
and registration-independent implementations. This means
that no matter how much the internal auto-registration list
changes that a game can still manage the protocol version
in a graceful way.
Prior to this change, removal of a class registration from
Serializers auto-registered list meant that a client->server
version mismatch was impossible to detect and handle gracefully.
Also, now that it was safe to do so, I removed the auto
registration of some odd Java beans classes.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9457 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
make it easier to reuse in classes that want to
read/write strings the same way without using
Serializer directly.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9456 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
some features that will make it slightly less fragile.
The code that registers a serializer for an ID has
been centralized.
A method was added to hand out new IDs and it now
skips IDs that are already in use. This will allow
certain serializers to be fixed against specific IDs
to maintain backwards and forwards compatability even
as the automatically registered list of serializers
changes.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9455 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
get an exception with the same info (and it's not a
warning anyway, it's fatal).
Also improved the error message to include the field
that failed to write.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8960 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
hindsight about the removal of RenderingHints. :P
Seemed simple enough... but now I have to watch people
get connection errors to my server instead of getting
a nice kick.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8942 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
server can configure additional ports that will be sent to
the client upon connection. These channels can be used to
send messages in parallel to the normal messages. This is
useful to keeping several separate command pathways flowing
smoothly despite potentially large messages on one channel.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8938 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
- separate jar files for engine components
- resolve dependencies between code parts
- remove Nifty dependency from Cinematics
- remove Physics dependency from TerrainGrid
- add public accessors to Natives Extraction
- remove RenderHint serialization from networking
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8839 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
networking layer. Note: because some messages were removed
from Serializer's auto-registration this version is not
binary-compatible with the last. So you must upgrade your
client and server at the same time.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8286 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
error message than an NPE but still isn't very helpful. This
usually only happens when things are totally confused, ie:
stream corruption or more likely misregistered classes.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8068 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
Removed an errant nextId decrement that would occur
even if the class was already registered and already
had an ID. This makes the teetering tower of glass
shards slightly less fragile... slightly.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7722 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
being serialized automatically.
When a class is final and in the field of a class that
is registered, it is safe to register it automatically
because the type can be determined reliably on the
other end of the stream. So now it allows that.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7276 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
being written hasn't been registered yet and does not
have an explicit ID set. The old way would try to send
it anyway and then it would fail to get received on the
other end.
A setStrictRegistration(false) method can be used to get the
old behavior if needed.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7222 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
the rest. Added an UnsupportedOperationException to
SerializableSerializer so that it doesn't silently fail
to do anything at all.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7219 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
to read from a buffer and doesn't understand what class
it's reading. Error messages... it's the little things
that matter.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7180 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
single-arg registerClass() method now throws an exception
if the object is not marked Serializable. Internally,
the package-load stuff uses the new alternate method that
allows safe non-exception throwing registration since it's
hitting it with every class in a package.
Interestingly enough, messages will still get written out
because of some questionable code in writeClassAndObject()...
but it won't be read as anything but null despite its
40+ bytes of data.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7121 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
the case of nulls. Note: this is specific to
serialized objects and is therefore not adding
a byte to things like Strings or arrays... those
will have to be reviewed separately.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7119 75d07b2b-3a1a-0410-a2c5-0572b91ccdca