1 package org.columba.chat.config; 19 20 import org.columba.chat.config.api.IAccount; 21 22 28 public class Account implements IAccount { 29 30 private String id; 31 32 private char[] password; 33 34 private String host; 35 36 private String resource; 37 38 private int port; 39 40 private boolean enableSSL; 41 42 public Account() { 43 host = "jabber.org"; 44 port = 5222; 45 enableSSL = false; 46 } 47 48 public Account(String id) { 49 this(); 50 51 if (id == null) 52 throw new IllegalArgumentException ("id == null"); 53 54 this.id = id; 55 } 56 57 public Account(String id, String host) { 58 this.id = id; 59 this.host = host; 60 61 port = 5222; 62 enableSSL = false; 63 } 64 65 68 public boolean isEnableSSL() { 69 return enableSSL; 70 } 71 72 75 public String getHost() { 76 return host; 77 } 78 79 82 public String getId() { 83 return id; 84 } 85 86 89 public char[] getPassword() { 90 return password; 91 } 92 93 96 public int getPort() { 97 return port; 98 } 99 100 104 public void setEnableSSL(boolean enableSSL) { 105 this.enableSSL = enableSSL; 106 } 107 108 112 public void setHost(String host) { 113 this.host = host; 114 } 115 116 120 public void setId(String id) { 121 this.id = id; 122 } 123 124 128 public void setPassword(char[] password) { 129 this.password = password; 130 } 131 132 136 public void setPort(int port) { 137 this.port = port; 138 } 139 140 143 public String getResource() { 144 return resource; 145 } 146 147 151 public void setResource(String resource) { 152 this.resource = resource; 153 } 154 } 155 | Popular Tags |