I have a method startSignalR
calling
mHub.on("broadcastMessage",
new SubscriptionHandler1<CustomMessage>() {
@Override
public void run(final CustomMessage msg) {
final String finalMsg = msg.UserName + ": " + msg.Message;
System.out.println(finalMsg);
}
}
, CustomMessage.class);
Now I wanna a dynamic class (not only CustomMessage) passed to the method, I have used Class <T> tClass
as parameter of "startSignalR", but get error at
new SubscriptionHandler1<tClass>()
Would you please tell me how to solve this?
I have found a solution