Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright 2008 Bluestem Software LLC. All Rights Reserved. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
 
 
 package org.bluestemsoftware.open.eoa.ext.feature.jms.server.activemq.mgmt.jmx;
 
 import  org.apache.activemq.broker.jmx.NetworkConnectorViewMBean;
 
 public class NetworkConnector implements NetworkConnectorMBean {
     
     private NetworkConnectorViewMBean underlying;
 
     public NetworkConnector(ExtensionFactoryContext factoryContext, NetworkConnectorViewMBean underlying) {
         this. = factoryContext;
         this. = underlying;
     }
 
     public void start() throws Exception {
         Thread thread = Thread.currentThread();
         ClassLoader cl = thread.getContextClassLoader();
         try {
             thread.setContextClassLoader(.getClassLoader());
             .start();
         } finally {
             thread.setContextClassLoader(cl);
         }
     }
 
     public void stop() throws Exception {
         Thread thread = Thread.currentThread();
         ClassLoader cl = thread.getContextClassLoader();
         try {
             thread.setContextClassLoader(.getClassLoader());
             .stop();
         } finally {
             thread.setContextClassLoader(cl);
         }
     }
 
     public String getName() {
         Thread thread = Thread.currentThread();
         ClassLoader cl = thread.getContextClassLoader();
         try {
             thread.setContextClassLoader(.getClassLoader());
             return .getName();
         } finally {
             thread.setContextClassLoader(cl);
         }
     }
 
     public int getNetworkTTL() {
         Thread thread = Thread.currentThread();
         ClassLoader cl = thread.getContextClassLoader();
         try {
             thread.setContextClassLoader(.getClassLoader());
             return .getNetworkTTL();
         } finally {
             thread.setContextClassLoader(cl);
         }
     }
 
     public String getPassword() {
         Thread thread = Thread.currentThread();
         ClassLoader cl = thread.getContextClassLoader();
         try {
             thread.setContextClassLoader(.getClassLoader());
             return .getPassword();
         } finally {
             thread.setContextClassLoader(cl);
         }
     }
 
     public int getPrefetchSize() {
         Thread thread = Thread.currentThread();
         ClassLoader cl = thread.getContextClassLoader();
         try {
             thread.setContextClassLoader(.getClassLoader());
             return .getPrefetchSize();
         } finally {
             thread.setContextClassLoader(cl);
         }
     }
 
     public String getUserName() {
        Thread thread = Thread.currentThread();
        ClassLoader cl = thread.getContextClassLoader();
        try {
            thread.setContextClassLoader(.getClassLoader());
            return .getUserName();
        } finally {
            thread.setContextClassLoader(cl);
        }
    }
    public boolean isBridgeTempDestinations() {
        Thread thread = Thread.currentThread();
        ClassLoader cl = thread.getContextClassLoader();
        try {
            thread.setContextClassLoader(.getClassLoader());
            return .isBridgeTempDestinations();
        } finally {
            thread.setContextClassLoader(cl);
        }
    }
    public boolean isConduitSubscriptions() {
        Thread thread = Thread.currentThread();
        ClassLoader cl = thread.getContextClassLoader();
        try {
            thread.setContextClassLoader(.getClassLoader());
            return .isConduitSubscriptions();
        } finally {
            thread.setContextClassLoader(cl);
        }
    }
    public boolean isDecreaseNetworkConsumerPriority() {
        Thread thread = Thread.currentThread();
        ClassLoader cl = thread.getContextClassLoader();
        try {
            thread.setContextClassLoader(.getClassLoader());
            return .isDecreaseNetworkConsumerPriority();
        } finally {
            thread.setContextClassLoader(cl);
        }
    }
    public boolean isDispatchAsync() {
        Thread thread = Thread.currentThread();
        ClassLoader cl = thread.getContextClassLoader();
        try {
            thread.setContextClassLoader(.getClassLoader());
            return .isDispatchAsync();
        } finally {
            thread.setContextClassLoader(cl);
        }
    }
    public boolean isDuplex() {
        Thread thread = Thread.currentThread();
        ClassLoader cl = thread.getContextClassLoader();
        try {
            thread.setContextClassLoader(.getClassLoader());
            return .isDuplex();
        } finally {
            thread.setContextClassLoader(cl);
        }
    }
    public boolean isDynamicOnly() {
        Thread thread = Thread.currentThread();
        ClassLoader cl = thread.getContextClassLoader();
        try {
            thread.setContextClassLoader(.getClassLoader());
            return .isDynamicOnly();
        } finally {
            thread.setContextClassLoader(cl);
        }
    }
    public void setBridgeTempDestinations(boolean bridgeTempDestinations) {
        Thread thread = Thread.currentThread();
        ClassLoader cl = thread.getContextClassLoader();
        try {
            thread.setContextClassLoader(.getClassLoader());
            .setBridgeTempDestinations(bridgeTempDestinations);
        } finally {
            thread.setContextClassLoader(cl);
        }
    }
    public void setConduitSubscriptions(boolean conduitSubscriptions) {
        Thread thread = Thread.currentThread();
        ClassLoader cl = thread.getContextClassLoader();
        try {
            thread.setContextClassLoader(.getClassLoader());
            .setConduitSubscriptions(conduitSubscriptions);
        } finally {
            thread.setContextClassLoader(cl);
        }
    }
    public void setDecreaseNetworkConsumerPriority(boolean decreaseNetworkConsumerPriority) {
        Thread thread = Thread.currentThread();
        ClassLoader cl = thread.getContextClassLoader();
        try {
            thread.setContextClassLoader(.getClassLoader());
            .setDecreaseNetworkConsumerPriority(decreaseNetworkConsumerPriority);
        } finally {
            thread.setContextClassLoader(cl);
        }
    }
    public void setDispatchAsync(boolean dispatchAsync) {
        Thread thread = Thread.currentThread();
        ClassLoader cl = thread.getContextClassLoader();
        try {
            thread.setContextClassLoader(.getClassLoader());
            .setDispatchAsync(dispatchAsync);
        } finally {
            thread.setContextClassLoader(cl);
        }
    }
    public void setDynamicOnly(boolean dynamicOnly) {
        Thread thread = Thread.currentThread();
        ClassLoader cl = thread.getContextClassLoader();
        try {
            thread.setContextClassLoader(.getClassLoader());
            .setDynamicOnly(dynamicOnly);
        } finally {
            thread.setContextClassLoader(cl);
        }
    }
    public void setNetworkTTL(int networkTTL) {
        Thread thread = Thread.currentThread();
        ClassLoader cl = thread.getContextClassLoader();
        try {
            thread.setContextClassLoader(.getClassLoader());
            .setNetworkTTL(networkTTL);
        } finally {
            thread.setContextClassLoader(cl);
        }
    }
    public void setPassword(String password) {
        Thread thread = Thread.currentThread();
        ClassLoader cl = thread.getContextClassLoader();
        try {
            thread.setContextClassLoader(.getClassLoader());
            .setPassword(password);
        } finally {
            thread.setContextClassLoader(cl);
        }
    }
    public void setPrefetchSize(int prefetchSize) {
        Thread thread = Thread.currentThread();
        ClassLoader cl = thread.getContextClassLoader();
        try {
            thread.setContextClassLoader(.getClassLoader());
            .setPrefetchSize(prefetchSize);
        } finally {
            thread.setContextClassLoader(cl);
        }
    }
    public void setUserName(String userName) {
        Thread thread = Thread.currentThread();
        ClassLoader cl = thread.getContextClassLoader();
        try {
            thread.setContextClassLoader(.getClassLoader());
            .setUserName(userName);
        } finally {
            thread.setContextClassLoader(cl);
        }
    }
    
 
    
New to GrepCode? Check out our FAQ X