Package com.sun.enterprise.config.serverbeans

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


            Config config = getConfig(targetName);
            if (config.getDiameterService() != null) {
                String msg = _strMgr.getString("DiameterSvcAlreadyExists", targetName);
                throw new ConfigException(msg);
            }
            DiameterService diaService = new DiameterService();
            diaService.setPeerConfiguration(createPeerConfig(targetName));
            _logger.log(Level.FINE, _sMgr.getString("diameteradmin.defaultValuesCreation"));
            config.setDiameterService(diaService);
            addSystemProperty(config);
        } catch (ConfigException e) {
            throw new MBeanException(e);
View Full Code Here


            if (poolName == null)
                poolName = "pool_" + id;
            if (jndiName == null)
                jndiName = "eas/" + poolName;
            checkDiameterInstalled();
            DiameterService diaService = getDiameterService(targetName);
            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);
View Full Code Here

        }
    }

    public void deletePeer(String targetName, String id) throws Exception {
        checkDiameterInstalled();
        DiameterService diaService = getDiameterService(targetName);
        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]);
View Full Code Here

    }

    public String[] listPeer(String targetName) throws MBeanException {
        String[] peerNames;
        checkDiameterInstalled();
        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();
View Full Code Here

    }

    public void createApplication(String targetName, String authAppId,
            String acctAppId, String applicationsId, String vendorId) throws MBeanException {
        checkDiameterInstalled();
        DiameterService diaService = getDiameterService(targetName);
        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);
View Full Code Here

    }

    public void createAuthApp(String targetName, String applicationsId, String vendorId, String authAppId)
            throws MBeanException {
        checkDiameterInstalled();
        DiameterService diaService = getDiameterService(targetName);
        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));
            }
View Full Code Here

    }

    public void deleteAuthApp(String targetName, String applicationsId, String vendorId, String authAppId)
            throws MBeanException {
        checkDiameterInstalled();
        DiameterService diaService = getDiameterService(targetName);
        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));
            }
View Full Code Here

    }

    public void createAcctApp(String targetName, String applicationsId, String vendorId, String acctAppId)
            throws MBeanException {
        checkDiameterInstalled();
        DiameterService diaService = getDiameterService(targetName);
        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));
            }
View Full Code Here

    }

    public void deleteAcctApp(String targetName, String applicationsId, String vendorId, String acctAppId)
            throws MBeanException {
        checkDiameterInstalled();
        DiameterService diaService = getDiameterService(targetName);
        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));
            }
View Full Code Here

    }
   
    public void deleteApplication(String targetName, String applicationsId, String vendorId)
                                                                            throws MBeanException {
        checkDiameterInstalled();
        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));
        }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.config.serverbeans.DiameterService

Copyright © 2018 www.massapicom. 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.