Interface RegistrationConnectionListener<T extends RegisteredRpcConnection<?,?,S,?>,S extends RegistrationResponse.Success,R extends RegistrationResponse.Rejection>
public interface RegistrationConnectionListener<T extends RegisteredRpcConnection<?,?,S,?>,S extends RegistrationResponse.Success,R extends RegistrationResponse.Rejection>
Classes which want to be notified about the registration result by the
RegisteredRpcConnection have to implement this interface.-
Method Summary
Modifier and TypeMethodDescriptionvoidonRegistrationFailure(Throwable failure) This method is called by theRegisteredRpcConnectionwhen the registration fails.voidonRegistrationRejection(String targetAddress, R rejection) This method is called by theRegisteredRpcConnectionwhen the registration is rejected.voidonRegistrationSuccess(T connection, S success) This method is called by theRegisteredRpcConnectionwhen the registration is success.
-
Method Details
-
onRegistrationSuccess
This method is called by theRegisteredRpcConnectionwhen the registration is success.- Parameters:
success- The concrete response information for successful registration.connection- The instance which established the connection
-
onRegistrationFailure
This method is called by theRegisteredRpcConnectionwhen the registration fails.- Parameters:
failure- The exception which causes the registration failure.
-
onRegistrationRejection
This method is called by theRegisteredRpcConnectionwhen the registration is rejected.- Parameters:
targetAddress- targetAddress from which the registration was rejected.rejection- rejection containing more information.
-