com.swingfrog.summer.protocol.protobuf.ReqProtobufMgr Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of summer Show documentation
Show all versions of summer Show documentation
a lightweight game server framework
package com.swingfrog.summer.protocol.protobuf;
import com.google.protobuf.Message;
public class ReqProtobufMgr extends AbstractProtobufMgr {
private static final String PREFIX_REQ = "req";
private static class SingleCase {
public static final ReqProtobufMgr INSTANCE = new ReqProtobufMgr();
}
public static ReqProtobufMgr get() {
return ReqProtobufMgr.SingleCase.INSTANCE;
}
@Override
protected void checkProto(Message messageTemplate) {
String protoName = messageTemplate.getClass().getSimpleName().toLowerCase();
if (!protoName.contains(PREFIX_REQ))
throw new IllegalArgumentException("not req proto -> " + messageTemplate.getClass().getName());
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy