com.tvd12.ezymq.mosquitto.handler.EzyMosquittoRequestHandler Maven / Gradle / Ivy
The newest version!
package com.tvd12.ezymq.mosquitto.handler;
import com.tvd12.ezyfox.exception.EzyNotImplementedException;
import com.tvd12.ezyfox.reflect.EzyGenerics;
import com.tvd12.ezymq.common.handler.EzyMQRequestHandler;
public interface EzyMosquittoRequestHandler
extends EzyMQRequestHandler {
default Class> getRequestType() {
try {
Class> handlerClass = getClass();
Class>[] args = EzyGenerics.getGenericInterfacesArguments(
handlerClass,
EzyMosquittoRequestHandler.class,
1
);
return args[0];
} catch (Exception e) {
throw new EzyNotImplementedException(
"unknown request type of: " + getClass().getName() +
", you must implement getRequestType method"
);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy