Examples of PeerConfiguration


Examples of com.sun.enterprise.config.serverbeans.PeerConfiguration

        listener.setDiameterApplicationRef("one");
        return listener;
    }

    public PeerConfiguration createPeerConfig(String targetName) throws MBeanException {
        PeerConfiguration peerConfig;
        try {
            peerConfig = new PeerConfiguration();
            Peers peers = new Peers();
            peers.setRetry("300");
            peerConfig.setPeers(peers);
            peerConfig.setListener(createListener(targetName));
            peerConfig.setMaxThreads("10");
            peerConfig.setMsgBufferSize("4096");
            peerConfig.setEnableMsgPersistence("false");

            DiameterApplications diaApps = new DiameterApplications();
            diaApps.setId("one");
            Application diaApp = new Application();
            Authapp authApp = new Authapp();
            authApp.setId("16777221");
            diaApp.addAuthapp(authApp);
            diaApp.setVendorid("10415");
            diaApps.addApplication(diaApp);
            peerConfig.addDiameterApplications(diaApps);
        } catch (ConfigException e) {
            throw new MBeanException(e);
        }
        return peerConfig;
    }
View Full Code Here

Examples of com.sun.enterprise.config.serverbeans.PeerConfiguration

            if (diaService == null) {
                String msg = _strMgr.getString("DiameterSvcDoesNotExists", targetName);
                throw new MBeanException(new ConfigException(msg));
            }
            createConnector(poolName, jndiName, connId, targetName);
            PeerConfiguration peerConfig = diaService.getPeerConfiguration();
            Peer newPeer = new Peer();
            newPeer.setId(id);
            newPeer.setHost(host);
            newPeer.setPort(port);
            newPeer.setRealm(realm);
            newPeer.setDiameterApplicationRef(diameterAppRef);
            Peers peers = peerConfig.getPeers();
            peers.addPeer(newPeer);
        } catch (ConfigException e) {
            throw new MBeanException(e);
        }
    }
View Full Code Here

Examples of com.sun.enterprise.config.serverbeans.PeerConfiguration

        boolean deleted = false;
        if (diaService == null) {
            String msg = _strMgr.getString("DiameterSvcDoesNotExists", targetName);
            throw new MBeanException(new ConfigException(msg));
        }
        PeerConfiguration peerConfig = diaService.getPeerConfiguration();
        Peers peers = peerConfig.getPeers();
        Peer[] peer = peers.getPeer();
        for (int i=0; i < peer.length; i++) {
            if (peer[i].getId().equals(id)) {
                peers.removePeer(peer[i]);
                deleted = true;
View Full Code Here

Examples of com.sun.enterprise.config.serverbeans.PeerConfiguration

        DiameterService diaService = getDiameterService(targetName);
        if (diaService == null) {
            String msg = _strMgr.getString("DiameterSvcDoesNotExists", targetName);
            throw new MBeanException(new ConfigException(msg));
        }
        PeerConfiguration peerConfig = diaService.getPeerConfiguration();
        Peers peers = peerConfig.getPeers();
        Peer[] peer = peers.getPeer();
        peerNames = new String[peer.length];
        for (int i=0; i < peer.length; i++)
            peerNames[i] = peer[i].getId();
        return peerNames;
View Full Code Here

Examples of com.sun.enterprise.config.serverbeans.PeerConfiguration

        if (diaService == null) {
            String msg = _strMgr.getString("DiameterSvcDoesNotExists", targetName);
            throw new MBeanException(new ConfigException(msg));
        }
        try {
            PeerConfiguration peerConfig = diaService.getPeerConfiguration();
            DiameterApplications diaApps = peerConfig.getDiameterApplicationsById(applicationsId);
            if (diaApps == null) {
                diaApps = new DiameterApplications();
                diaApps.setId(applicationsId);
                peerConfig.addDiameterApplications(diaApps);
            }
            Application diaApp = new Application();
            diaApp.setVendorid(vendorId);
            if (acctAppId != null) {
                Acctapp acctApp = new Acctapp();
View Full Code Here

Examples of com.sun.enterprise.config.serverbeans.PeerConfiguration

        if (diaService == null) {
            String msg = _strMgr.getString("DiameterSvcDoesNotExists", targetName);
            throw new MBeanException(new ConfigException(msg));
        }
        try {
            PeerConfiguration peerConfig = diaService.getPeerConfiguration();
            DiameterApplications diaApps = peerConfig.getDiameterApplicationsById(applicationsId);
            if (diaApps == null) {
                String msg = _strMgr.getString("ApplicationsNotAvl", targetName);
                throw new MBeanException(new ConfigException(msg));
            }
            Application diaApp = diaApps.getApplicationByVendorid(vendorId);
View Full Code Here

Examples of com.sun.enterprise.config.serverbeans.PeerConfiguration

        if (diaService == null) {
            String msg = _strMgr.getString("DiameterSvcDoesNotExists", targetName);
            throw new MBeanException(new ConfigException(msg));
        }
        try {
            PeerConfiguration peerConfig = diaService.getPeerConfiguration();
            DiameterApplications diaApps = peerConfig.getDiameterApplicationsById(applicationsId);
            if (diaApps == null) {
                String msg = _strMgr.getString("ApplicationsNotAvl", targetName);
                throw new MBeanException(new ConfigException(msg));
            }
            Application diaApp = diaApps.getApplicationByVendorid(vendorId);
View Full Code Here

Examples of com.sun.enterprise.config.serverbeans.PeerConfiguration

        if (diaService == null) {
            String msg = _strMgr.getString("DiameterSvcDoesNotExists", targetName);
            throw new MBeanException(new ConfigException(msg));
        }
        try {
            PeerConfiguration peerConfig = diaService.getPeerConfiguration();
            DiameterApplications diaApps = peerConfig.getDiameterApplicationsById(applicationsId);
            if (diaApps == null) {
                String msg = _strMgr.getString("ApplicationsNotAvl", targetName);
                throw new MBeanException(new ConfigException(msg));
            }
            Application diaApp = diaApps.getApplicationByVendorid(vendorId);
View Full Code Here

Examples of com.sun.enterprise.config.serverbeans.PeerConfiguration

        if (diaService == null) {
            String msg = _strMgr.getString("DiameterSvcDoesNotExists", targetName);
            throw new MBeanException(new ConfigException(msg));
        }
        try {
            PeerConfiguration peerConfig = diaService.getPeerConfiguration();
            DiameterApplications diaApps = peerConfig.getDiameterApplicationsById(applicationsId);
            if (diaApps == null) {
                String msg = _strMgr.getString("ApplicationsNotAvl", targetName);
                throw new MBeanException(new ConfigException(msg));
            }
            Application diaApp = diaApps.getApplicationByVendorid(vendorId);
View Full Code Here

Examples of com.sun.enterprise.config.serverbeans.PeerConfiguration

        DiameterService diaService = getDiameterService(targetName);
        if (diaService == null) {
            String msg = _strMgr.getString("DiameterSvcDoesNotExists", targetName);
            throw new MBeanException(new Exception(msg));
        }
        PeerConfiguration peerConfig = diaService.getPeerConfiguration();
        DiameterApplications diaApps = peerConfig.getDiameterApplicationsById(applicationsId);
        if (diaApps == null) {
            String msg = _strMgr.getString("ApplicationsNotAvl");
            throw new MBeanException(new ConfigException(msg));
        }
        Application[] apps = diaApps.getApplication();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.