001: /*
002: * ChainBuilder ESB
003: * Visual Enterprise Integration
004: *
005: * Copyright (C) 2006 Bostech Corporation
006: *
007: * This program is free software; you can redistribute it and/or modify it
008: * under the terms of the GNU General Public License as published by the
009: * Free Software Foundation; either version 2 of the License, or (at your option)
010: * any later version.
011: *
012: * This program is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
014: * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
015: * for more details.
016: *
017: * You should have received a copy of the GNU General Public License along with
018: * this program; if not, write to the Free Software Foundation, Inc.,
019: * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
020: *
021: *
022: * $Id $
023: */
024: package com.bostechcorp.cbesb.console.common;
025:
026: import com.bostechcorp.cbesb.console.pub.JmxAssemblyObj;
027: import com.bostechcorp.cbesb.console.pub.JmxComponentObj;
028: import com.bostechcorp.cbesb.console.pub.JmxEndpointObj;
029: import com.bostechcorp.cbesb.console.pub.StatusConstants;
030: import com.google.gwt.user.client.rpc.IsSerializable;
031:
032: public class JmxEndpointInfo extends BaseRPCResultInfo implements
033: IsSerializable {
034:
035: public static final int GET_DISPLAY_TITLES = 2;
036: public static final int GET_COMPONENT_ENDPOINTS = 3;
037: public static final int GET_PROPERTY_OBJECTS = 4;
038: public static final int SET_PROPERTY_OBJECTS = 5;
039: public static final int DELETE_PROPERTY_OBJECTS = 15;
040:
041: public static final int START_ENDPOINT = 6;
042: public static final int STOP_ENDPOINT = 7;
043: public static final int CYCLE_ENDPOINT = 8;
044:
045: public static final int WAIT_FOR_STATE_CHANGE = 9;
046: public static final int WAIT_FOR_STATISTICS_CHANGE = 10;
047:
048: public static final int GET_SA_LIST = 11;
049: public static final int GET_SA_STAT_LIST = 12;
050:
051: public static final String[] LifeCycleOper = new String[] { "Stop",
052: "Start" };
053: //public static final String STATUS_DOWN="Down";
054: // public static final String STATUS_STOP="Stopped";
055: //public static final String STATUS_START="Started";
056: //public static final String STATUS_RETRY_STOP="RetryStopped";
057: //public static final String STATUS_CLOSING="Closing";
058:
059: //public static final String STATUS_UP="Up";
060:
061: private JmxEndpointObj curEndpointObj;
062:
063: public static boolean isDownStatus(String status) {
064: if (status.equalsIgnoreCase(StatusConstants.STATUS_UP)
065: || status
066: .equalsIgnoreCase(StatusConstants.STATUS_STARTED)
067: || status
068: .equalsIgnoreCase(StatusConstants.STATUS_RETRY_STARTED))
069: return false;
070: else
071: return true;
072: }
073:
074: private String endpointThatChanged = null;
075: private boolean statChanged;
076:
077: private JmxAssemblyObj[] saList;
078: private JmxComponentObj componentObj;
079:
080: /**
081: * @return the endpointThatChanged
082: */
083: public String getEndpointThatChanged() {
084: return endpointThatChanged;
085: }
086:
087: /**
088: * @param endpointThatChanged the endpointThatChanged to set
089: */
090: public void setEndpointThatChanged(String endpointThatChanged) {
091: this .endpointThatChanged = endpointThatChanged;
092: }
093:
094: public JmxAssemblyObj[] getSaList() {
095: return saList;
096: }
097:
098: public void setSaList(JmxAssemblyObj[] saList) {
099: this .saList = saList;
100: }
101:
102: public JmxComponentObj getComponentObj() {
103: return componentObj;
104: }
105:
106: public void setComponentObj(JmxComponentObj componentObj) {
107: this .componentObj = componentObj;
108: }
109:
110: public JmxEndpointObj getCurEndpointObj() {
111: return curEndpointObj;
112: }
113:
114: public void setCurEndpointObj(JmxEndpointObj curEndpointObj) {
115: this .curEndpointObj = curEndpointObj;
116: }
117:
118: public boolean isStatChanged() {
119: return statChanged;
120: }
121:
122: public void setStatChanged(boolean statChanged) {
123: this.statChanged = statChanged;
124: }
125:
126: }
|