001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one
003: * or more contributor license agreements. See the NOTICE file
004: * distributed with this work for additional information
005: * regarding copyright ownership. The ASF licenses this file
006: * to you under the Apache License, Version 2.0 (the
007: * "License"); you may not use this file except in compliance
008: * with the License. You may obtain a copy of the License at
009: *
010: * http://www.apache.org/licenses/LICENSE-2.0
011: *
012: * Unless required by applicable law or agreed to in writing,
013: * software distributed under the License is distributed on an
014: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015: * KIND, either express or implied. See the License for the
016: * specific language governing permissions and limitations
017: * under the License.
018: */
019:
020: package org.apache.geronimo.farm.config;
021:
022: import java.io.Serializable;
023: import java.net.InetSocketAddress;
024:
025: import org.apache.geronimo.deployment.service.DoNotPersist;
026: import org.apache.geronimo.deployment.service.EncryptOnPersist;
027:
028: /**
029: *
030: * @version $Rev:$ $Date:$
031: */
032: public class BasicExtendedJMXConnectorInfo implements
033: ExtendedJMXConnectorInfo, Serializable {
034: private String username;
035: private String password;
036: private String protocol;
037: private String host;
038: private int port = -1;
039: private String urlPath;
040: private boolean local;
041:
042: public String getHost() {
043: return host;
044: }
045:
046: @DoNotPersist
047: public InetSocketAddress getListenAddress() {
048: return new InetSocketAddress(host, port);
049: }
050:
051: public int getPort() {
052: return port;
053: }
054:
055: public String getProtocol() {
056: return protocol;
057: }
058:
059: public String getUrlPath() {
060: return urlPath;
061: }
062:
063: public void setHost(String host) {
064: this .host = host;
065: }
066:
067: public void setPort(int port) {
068: this .port = port;
069: }
070:
071: public void setProtocol(String protocol) {
072: this .protocol = protocol;
073: }
074:
075: public void setUrlPath(String urlPath) {
076: this .urlPath = urlPath;
077: }
078:
079: @EncryptOnPersist
080: public String getPassword() {
081: return password;
082: }
083:
084: public String getUsername() {
085: return username;
086: }
087:
088: public void setPassword(String password) {
089: this .password = password;
090: }
091:
092: public void setUsername(String username) {
093: this .username = username;
094: }
095:
096: public boolean isLocal() {
097: return local;
098: }
099:
100: public void setLocal(boolean local) {
101: this.local = local;
102: }
103:
104: }
|