KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jivesoftware > messenger > server > RemoteServerConfiguration


1 package org.jivesoftware.messenger.server;
2
3 /**
4  * Holds the configuration when connecting to/from a remote server. The configuration specifies
5  * if incoming or outgoing connections are allowed to the remote server and the port to use
6  * when creating an outgoing connection.
7  *
8  * @author Gaston Dombiak
9  */

10 public class RemoteServerConfiguration {
11
12     private String JavaDoc domain;
13
14     private Permission permission;
15
16     private int remotePort;
17
18     public RemoteServerConfiguration(String JavaDoc domain) {
19         this.domain = domain;
20     }
21
22     public String JavaDoc getDomain() {
23         return domain;
24     }
25
26     public Permission getPermission() {
27         return permission;
28     }
29
30     public void setPermission(Permission permission) {
31         this.permission = permission;
32     }
33
34     public int getRemotePort() {
35         return remotePort;
36     }
37
38     public void setRemotePort(int remotePort) {
39         this.remotePort = remotePort;
40     }
41
42     public enum Permission {
43         /**
44          * The XMPP entity is allowed to connect to the server.
45          */

46         allowed,
47
48         /**
49          * The XMPP entity is NOT allowed to connect to the server.
50          */

51         blocked;
52     }
53 }
54
Popular Tags