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: 706640 $ $Date: 2008-10-21 14:44:05 +0000 (Tue, 21 Oct 2008) $ 031 */ 032 public class BasicExtendedJMXConnectorInfo implements ExtendedJMXConnectorInfo, Serializable { 033 private String username; 034 private String password; 035 private String protocol; 036 private String host; 037 private int port = -1; 038 private String urlPath; 039 private boolean local; 040 041 public String getHost() { 042 return host; 043 } 044 045 @DoNotPersist 046 public InetSocketAddress getListenAddress() { 047 return new InetSocketAddress(host, port); 048 } 049 050 public int getPort() { 051 return port; 052 } 053 054 public String getProtocol() { 055 return protocol; 056 } 057 058 public String getUrlPath() { 059 return urlPath; 060 } 061 062 public void setHost(String host) { 063 this.host = host; 064 } 065 066 public void setPort(int port) { 067 this.port = port; 068 } 069 070 public void setProtocol(String protocol) { 071 this.protocol = protocol; 072 } 073 074 public void setUrlPath(String urlPath) { 075 this.urlPath = urlPath; 076 } 077 078 @EncryptOnPersist 079 public String getPassword() { 080 return password; 081 } 082 083 public String getUsername() { 084 return username; 085 } 086 087 public void setPassword(String password) { 088 this.password = password; 089 } 090 091 public void setUsername(String username) { 092 this.username = username; 093 } 094 095 public boolean isLocal() { 096 return local; 097 } 098 099 public void setLocal(boolean local) { 100 this.local = local; 101 } 102 103 }