@Override
    protected CollectionSchema.MessageFactory resolveCollectionFrom(Input input)
            throws IOException
    {
        final int id = input.readUInt32();

        final CollectionSchema.MessageFactory factory = id < collections.size() ?
                collections.get(id) : null;
        if (factory == null)
            throw new UnknownTypeException("collection id: " + id + " (Outdated registry)");

        return factory;
    }
Register a {@link Delegate} and assign an id.
<p>
Delegate ids start at 1.
protostuff-runtime-registry/src/main/java/io/protostuff/runtime/ExplicitIdStrategy.java