package p421.p422.p423.p432;

import java.lang.reflect.Modifier;
import java.util.Collection;
import net.engio.mbassy.bus.error.MessageBusException;
import p138.p139.p143.p144.C2803;
import p421.p422.p423.p424.C6708;
import p421.p422.p423.p428.C6729;
import p421.p422.p423.p428.C6732;
import p421.p422.p423.p429.C6735;
import p421.p422.p423.p429.C6738;
import p421.p422.p423.p429.C6739;
import p421.p422.p423.p429.C6742;
import p421.p422.p423.p429.C6743;
import p421.p422.p423.p429.C6744;
import p421.p422.p423.p429.InterfaceC6740;
import p421.p422.p423.p429.InterfaceC6741;
import p421.p422.p423.p431.C6756;
import p421.p422.p423.p431.EnumC6754;
import p421.p422.p423.p431.EnumC6760;
import p421.p422.p423.p431.InterfaceC6755;

/* JADX INFO: renamed from: ޏ.֏.֏.ނ.ރ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
public class C6768 {
    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public InterfaceC6740 m9923(C6767 c6767) throws MessageBusException {
        Class<? extends C6743> cls = c6767.f19554.f19532;
        if (cls.isMemberClass() && !Modifier.isStatic(cls.getModifiers())) {
            throw new MessageBusException("The handler invocation must be top level class or nested STATIC inner class");
        }
        try {
            C6743 c6743NewInstance = cls.getConstructor(C6767.class).newInstance(c6767);
            if (c6767.f19554.f19538) {
                c6743NewInstance = new C6744(c6743NewInstance);
            }
            return c6767.f19554.f19533.equals(EnumC6754.Asynchronously) ? new C6735(c6743NewInstance) : c6743NewInstance;
        } catch (NoSuchMethodException e) {
            StringBuilder sbM4889 = C2803.m4889("The provided handler invocation did not specify the necessary constructor ");
            sbM4889.append(cls.getSimpleName());
            sbM4889.append("(SubscriptionContext);");
            throw new MessageBusException(sbM4889.toString(), e);
        } catch (Exception e2) {
            StringBuilder sbM48892 = C2803.m4889("Could not instantiate the provided handler invocation ");
            sbM48892.append(cls.getSimpleName());
            throw new MessageBusException(sbM48892.toString(), e2);
        }
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public C6765 m9924(C6708 c6708, C6756 c6756) throws MessageBusException {
        String str;
        try {
            C6767 c6767 = new C6767(c6708, c6756, (Collection) c6708.m9909("bus.handlers.error"));
            InterfaceC6741 c6742 = new C6742(c6767, m9923(c6767));
            if (c6767.f19554.f19534) {
                c6742 = new C6738(c6742);
            }
            C6756 c67562 = c6767.f19554;
            boolean z = true;
            if (c67562.f19529.length > 0 || ((str = c67562.f19530) != null && str.trim().length() > 0)) {
                c6742 = new C6739(c6742);
            }
            InterfaceC6755 interfaceC6755 = c6756.f19537.f19540;
            if (interfaceC6755 == null || !interfaceC6755.references().equals(EnumC6760.Strong)) {
                z = false;
            }
            return new C6765(c6767, c6742, z ? new C6729() : new C6732());
        } catch (Exception e) {
            throw new MessageBusException(e);
        }
    }
}
