use of com.generallycloud.baseio.container.jms.client.impl.OnMappedMessage in project baseio by generallycloud.
the class RTPClient method setRTPHandle.
public void setRTPHandle(final RTPHandle handle) throws RTPException {
if (this.handle != null) {
return;
}
this.consumer.listen("invite", new OnMappedMessage() {
@Override
public void onReceive(MapMessage message) {
handle.onInvite(RTPClient.this, message);
}
});
this.consumer.listen("invite-reply", new OnMappedMessage() {
@Override
public void onReceive(MapMessage message) {
handle.onInviteReplyed(RTPClient.this, message);
}
});
this.consumer.listen("break", new OnMappedMessage() {
@Override
public void onReceive(MapMessage message) {
handle.onBreak(RTPClient.this, message);
}
});
this.handle = handle;
try {
this.consumer.receive(null);
} catch (MQException e) {
throw new RTPException(e);
}
}
Aggregations