Package org.rioproject.deploy

Examples of org.rioproject.deploy.DeployAdmin


        ProvisionMonitor monitor = (ProvisionMonitor) item.service;
        ProvisionMonitorPanel pmp = addProvisionMonitorPanel(item);
        clientEventConsumer.register(item);

        //failureEventConsumer.register(item);
        DeployAdmin da = (DeployAdmin)monitor.getAdmin();
        OperationalStringManager[] opStringMgrs = da.getOperationalStringManagers();
        if (opStringMgrs == null || opStringMgrs.length == 0) {
            return;
        }
        for (OperationalStringManager opStringMgr : opStringMgrs) {
            OperationalString ops = opStringMgr.getOperationalString();
View Full Code Here


                    ProvisionMonitorPanel pmp = addProvisionMonitorPanel(item);

                    clientEventConsumer.register(item);

                    //failureEventConsumer.register(item);
                    DeployAdmin da = (DeployAdmin)monitor.getAdmin();
                    OperationalStringManager[] opStringMgrs = da.getOperationalStringManagers();
                    if (opStringMgrs.length == 0) {
                        return;
                    }
                    for (OperationalStringManager opStringMgr : opStringMgrs) {
                        OperationalString ops = opStringMgr.getOperationalString();
View Full Code Here

                case OPSTRING_DEPLOYED:
                    if(opString == null) {
                        peerLogger.warn("ProvisionMonitorPeer: OPSTRING_DEPLOYED opstring is null");
                        return;
                    }
                    DeployAdmin deployAdmin = (DeployAdmin)remoteMonitor.getAdmin();
                    opStringProcessor(opString, remoteMonitor, deployAdmin, pme.getRemoteRepositories());
                    peerLogger.trace("ProvisionMonitorPeer: OPSTRING_DEPLOYED, opstring: {}", opString.getName());
                    break;
                case OPSTRING_UNDEPLOYED:
                    if(opString == null) {
View Full Code Here

     *
     * @param peer The peer ProvisionMonitor service
     */
    void importOperationalStrings(final ProvisionMonitor peer) {
        try {
            DeployAdmin peerDeployAdmin = (DeployAdmin)peer.getAdmin();
            OperationalStringManager[] mgrs = peerDeployAdmin.getOperationalStringManagers();
            if(mgrs == null || mgrs.length == 0) {
                return;
            }
            for (OperationalStringManager mgr : mgrs) {
                if (mgr.isManaging()) {
View Full Code Here

    public OperationalStringManager getPrimary(final String name) {
        OperationalStringManager mgr = null;
        ProvisionMonitor[] monitors = provisionMonitorPeer.getProvisionMonitorPeers();
        for (ProvisionMonitor monitor : monitors) {
            try {
                DeployAdmin dAdmin = (DeployAdmin) monitor.getAdmin();
                OperationalStringManager[] mgrs =
                    dAdmin.getOperationalStringManagers();
                for (OperationalStringManager mgr1 : mgrs) {
                    if (mgr1.getOperationalString().getName().equals(name) &&
                        mgr1.isManaging()) {
                        mgr = mgr1;
                        break;
View Full Code Here

     * @param opStringName The opstring name
     * @return The primary DeployAdmin for the opstring, or null
     * if not found
     */
    public DeployAdmin getPrimaryDeployAdmin(final String opStringName) {
        DeployAdmin primary = null;
        ProvisionMonitor.PeerInfo[] peers = provisionMonitorPeer.getBackupInfo();
        for (ProvisionMonitor.PeerInfo peer : peers) {
            ProvisionMonitor peerMon = peer.getService();
            try {
                DeployAdmin dAdmin = (DeployAdmin) peerMon.getAdmin();
                if(dAdmin.hasDeployed(opStringName)) {
                    OperationalStringManager mgr = dAdmin.getOperationalStringManager(opStringName);
                    if (mgr.isManaging()) {
                        primary = dAdmin;
                        break;
                    }
                }
View Full Code Here

    @Test
    public void testNotifyWithForkedService() {
        Throwable thrown = null;
        try {
            DeployAdmin dAdmin = (DeployAdmin)monitor.getAdmin();
            Assert.assertEquals("Expected no active deployments",
                                0,
                                dAdmin.getOperationalStringManagers().length);
        } catch (RemoteException e) {
            e.printStackTrace();
            thrown = e;
        }
        Assert.assertNull(thrown);
View Full Code Here

            Throwable toThrow = null;
            for(int i=0; i<3; i++) {
                if(terminated)
                    break;
                try {
                    DeployAdmin dAdmin = (DeployAdmin)((Administrable)monitor).getAdmin();
                    opMgr = dAdmin.getOperationalStringManager(name);
                    toThrow = null;
                    break;
                } catch(Throwable t) {
                    //t.printStackTrace();
                    toThrow = t;
View Full Code Here

                final GraphNode node = graphView.getOpStringNode(name);
                final JDialog waitDialog = new WaitingDialog(frame, "Undeploying "+name+"...", 500);
                org.rioproject.tools.ui.util.SwingWorker worker = new org.rioproject.tools.ui.util.SwingWorker() {
                    public Object construct() {
                        try {
                            DeployAdmin dAdmin = (DeployAdmin)node.getProvisionMonitor().getAdmin();
                            dAdmin.undeploy(name);
                        } catch(OperationalStringException e) {
                            graphView.removeOpString(name);
                        } catch(Exception e) {
                            System.err.println("OUCH");
                            e.printStackTrace();
View Full Code Here

    public static OperationalStringManager getOperationalStringManager(final ProvisionManager monitor,
                                                                       final String opStringName)
        throws RemoteException, OperationalStringException {
    if (monitor == null)
      return null;
        DeployAdmin da = (DeployAdmin) ((Administrable)monitor).getAdmin();
        OperationalStringManager mgr = da.getOperationalStringManager(opStringName);
        return(mgr);
    }
View Full Code Here

TOP

Related Classes of org.rioproject.deploy.DeployAdmin

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.