// Path: camelwatch-api/src/main/java/org/camelwatch/api/CamelBean.java
// public class CamelBean {
// 
// 	private final Map<String, Object>	properties	= Maps.newTreeMap();
// 
// 	private String				name;
// 
// 	private String				description;
// 
// 	public String getDescription() {
// 		return description;
// 	}
// 
// 	public String getName() {
// 		return name;
// 	}
// 
// 	public Map<String, Object> getProperties() {
// 		return properties;
// 	}
// 
// 	public void setDescription(String description) {
// 		this.description = description;
// 	}
// 
// 	public void setName(String name) {
// 		this.name = name;
// 	}
// 
// }
// 
// Path: camelwatch-api/src/main/java/org/camelwatch/api/CamelConnection.java
// public interface CamelConnection {
// 
// 	CamelBean getComponent(String componentName) throws Exception;
// 
// 	List<CamelBean> getComponents() throws Exception;
// 
// 	CamelBean getConsumer(String consumerId) throws Exception;
// 
// 	ConsumerOperations getConsumerOperations(String consumerId) throws Exception;
// 
// 	List<CamelBean> getConsumers() throws Exception;
// 
// 	CamelBean getContext(String camelId) throws Exception;
// 
// 	List<CamelBean> getContexts() throws Exception;
// 
// 	CamelBean getEndpoint(String endpointName) throws Exception;
// 
// 	EndpointOperations getEndpointOperations(String endpointName) throws Exception;
// 
// 	List<CamelBean> getEndpoints() throws Exception;
// 
// 	CamelBean getErrorHandler(String errorHandlerName) throws Exception;
// 
// 	List<CamelBean> getErrorHandlers() throws Exception;
// 
// 	CamelBean getProcessor(String processorId) throws Exception;
// 
// 	List<CamelBean> getProcessors() throws Exception;
// 
// 	Collection<CamelBean> getProcessors(String routeId) throws Exception;
// 
// 	CamelBean getRoute(String routeId) throws Exception;
// 
// 	RouteOperations getRouteOperations(String routeId) throws Exception;
// 
// 	List<CamelBean> getRoutes() throws Exception;
// 
// }
// 
// Path: camelwatch-api/src/main/java/org/camelwatch/api/CamelConnectionFactory.java
// @Service
// public class CamelConnectionFactory {
// 
//     @Value("${jmx.endpoint.url}")
//     private String url;
// 
//     @Value("${jmx.endpoint.username}")
//     private String username;
// 
//     @Value("${jmx.endpoint.password}")
//     private String password;
// 
//     private final Map<ObjectName, MBeanInfo> beanInfoCache = Maps.newHashMap();
// 
//     public CamelConnection getConnection() throws MalformedObjectNameException, NullPointerException, IOException {
//         return new CamelJmxConnection(url, username, password, beanInfoCache);
//     }
// 
//     public CamelConnection getConnection(String url, String username, String password) throws MalformedObjectNameException, NullPointerException, IOException {
//         Map<ObjectName, MBeanInfo> beanInfoCache = Maps.newHashMap() ;
//         return new CamelJmxConnection(url, username, password, beanInfoCache);
//     }
// }
// 
// Path: camelwatch-api/src/main/java/org/camelwatch/api/Message.java
// public class Message {
// 
// 	private String				exchangeId;
// 
// 	private final Map<String, String>	headers	= Maps.newHashMap();
// 
// 	private String				body;
// 
// 	private String				bodyType;
// 
// 	public String getBody() {
// 		return body;
// 	}
// 
// 	public String getBodyType() {
// 		return bodyType;
// 	}
// 
// 	public String getExchangeId() {
// 		return exchangeId;
// 	}
// 
// 	public Map<String, String> getHeaders() {
// 		return headers;
// 	}
// 
// 	public void setBody(String body) {
// 		this.body = body;
// 	}
// 
// 	public void setBodyType(String bodyType) {
// 		this.bodyType = bodyType;
// 	}
// 
// 	public void setExchangeId(String exchangeId) {
// 		this.exchangeId = exchangeId;
// 	}
// }
// 
// Path: camelwatch-api/src/main/java/org/camelwatch/api/endpoint/EndpointOperations.java
// public interface EndpointOperations {
// 
// 	String browseExchange(int offset) throws Exception;
// 
// 	Message browseMessageAsXml(int offset, boolean includeBody) throws Exception;
// 
// 	String browseMessageBody(int offset) throws Exception;
// 
// 	List<Message> browseRangeMessagesAsXml(int offset, int end, boolean includeBody) throws Exception;
// 
// 	long queueSize() throws Exception;
// }


import org.camelwatch.api.CamelBean;
import org.camelwatch.api.CamelConnection;
import org.camelwatch.api.CamelConnectionFactory;
import org.camelwatch.api.Message;
import org.camelwatch.api.endpoint.EndpointOperations;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import java.util.List;

package camelwatch.web;




/**
 * @author Stephen K Samuel samspade79@gmail.com 1 Jul 2012 19:02:59
 */
@Controller
@RequestMapping("endpoint")
public class EndpointController {

    private static final int MAX_OVERVIEW_MESSAGES = 15;
    @Autowired

// Path: camelwatch-api/src/main/java/org/camelwatch/api/CamelBean.java
// public class CamelBean {
// 
// 	private final Map<String, Object>	properties	= Maps.newTreeMap();
// 
// 	private String				name;
// 
// 	private String				description;
// 
// 	public String getDescription() {
// 		return description;
// 	}
// 
// 	public String getName() {
// 		return name;
// 	}
// 
// 	public Map<String, Object> getProperties() {
// 		return properties;
// 	}
// 
// 	public void setDescription(String description) {
// 		this.description = description;
// 	}
// 
// 	public void setName(String name) {
// 		this.name = name;
// 	}
// 
// }
// 
// Path: camelwatch-api/src/main/java/org/camelwatch/api/CamelConnection.java
// public interface CamelConnection {
// 
// 	CamelBean getComponent(String componentName) throws Exception;
// 
// 	List<CamelBean> getComponents() throws Exception;
// 
// 	CamelBean getConsumer(String consumerId) throws Exception;
// 
// 	ConsumerOperations getConsumerOperations(String consumerId) throws Exception;
// 
// 	List<CamelBean> getConsumers() throws Exception;
// 
// 	CamelBean getContext(String camelId) throws Exception;
// 
// 	List<CamelBean> getContexts() throws Exception;
// 
// 	CamelBean getEndpoint(String endpointName) throws Exception;
// 
// 	EndpointOperations getEndpointOperations(String endpointName) throws Exception;
// 
// 	List<CamelBean> getEndpoints() throws Exception;
// 
// 	CamelBean getErrorHandler(String errorHandlerName) throws Exception;
// 
// 	List<CamelBean> getErrorHandlers() throws Exception;
// 
// 	CamelBean getProcessor(String processorId) throws Exception;
// 
// 	List<CamelBean> getProcessors() throws Exception;
// 
// 	Collection<CamelBean> getProcessors(String routeId) throws Exception;
// 
// 	CamelBean getRoute(String routeId) throws Exception;
// 
// 	RouteOperations getRouteOperations(String routeId) throws Exception;
// 
// 	List<CamelBean> getRoutes() throws Exception;
// 
// }
// 
// Path: camelwatch-api/src/main/java/org/camelwatch/api/CamelConnectionFactory.java
// @Service
// public class CamelConnectionFactory {
// 
//     @Value("${jmx.endpoint.url}")
//     private String url;
// 
//     @Value("${jmx.endpoint.username}")
//     private String username;
// 
//     @Value("${jmx.endpoint.password}")
//     private String password;
// 
//     private final Map<ObjectName, MBeanInfo> beanInfoCache = Maps.newHashMap();
// 
//     public CamelConnection getConnection() throws MalformedObjectNameException, NullPointerException, IOException {
//         return new CamelJmxConnection(url, username, password, beanInfoCache);
//     }
// 
//     public CamelConnection getConnection(String url, String username, String password) throws MalformedObjectNameException, NullPointerException, IOException {
//         Map<ObjectName, MBeanInfo> beanInfoCache = Maps.newHashMap() ;
//         return new CamelJmxConnection(url, username, password, beanInfoCache);
//     }
// }
// 
// Path: camelwatch-api/src/main/java/org/camelwatch/api/Message.java
// public class Message {
// 
// 	private String				exchangeId;
// 
// 	private final Map<String, String>	headers	= Maps.newHashMap();
// 
// 	private String				body;
// 
// 	private String				bodyType;
// 
// 	public String getBody() {
// 		return body;
// 	}
// 
// 	public String getBodyType() {
// 		return bodyType;
// 	}
// 
// 	public String getExchangeId() {
// 		return exchangeId;
// 	}
// 
// 	public Map<String, String> getHeaders() {
// 		return headers;
// 	}
// 
// 	public void setBody(String body) {
// 		this.body = body;
// 	}
// 
// 	public void setBodyType(String bodyType) {
// 		this.bodyType = bodyType;
// 	}
// 
// 	public void setExchangeId(String exchangeId) {
// 		this.exchangeId = exchangeId;
// 	}
// }
// 
// Path: camelwatch-api/src/main/java/org/camelwatch/api/endpoint/EndpointOperations.java
// public interface EndpointOperations {
// 
// 	String browseExchange(int offset) throws Exception;
// 
// 	Message browseMessageAsXml(int offset, boolean includeBody) throws Exception;
// 
// 	String browseMessageBody(int offset) throws Exception;
// 
// 	List<Message> browseRangeMessagesAsXml(int offset, int end, boolean includeBody) throws Exception;
// 
// 	long queueSize() throws Exception;
// }


// Path: camelwatch-web/src/main/java/camelwatch/web/EndpointController.java
import org.camelwatch.api.CamelBean;
import org.camelwatch.api.CamelConnection;
import org.camelwatch.api.CamelConnectionFactory;
import org.camelwatch.api.Message;
import org.camelwatch.api.endpoint.EndpointOperations;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import java.util.List;

package camelwatch.web;




/**
 * @author Stephen K Samuel samspade79@gmail.com 1 Jul 2012 19:02:59
 */
@Controller
@RequestMapping("endpoint")
public class EndpointController {

    private static final int MAX_OVERVIEW_MESSAGES = 15;
    @Autowired

    private CamelConnectionFactory connectionFactory;
