OSDN Git Service

0f36e74f6deed6a377ddbe1c2fe81b7124c89ac9
[coroid/inqubus.git] / frontend / src / saccubus / converter / Proxy.java
1 /* $Id$ */
2 package saccubus.converter;
3
4 import org.apache.commons.lang.StringUtils;
5
6 /**
7  *
8  * @author yuki
9  */
10 public class Proxy {
11
12     private String host;
13     private int port;
14     public static final Proxy NO_PROXY = new Proxy();
15
16     private Proxy() {
17         this.host = null;
18         this.port = -1;
19     }
20
21     public Proxy(String host, int port) {
22         if (StringUtils.isEmpty(host) || port < 0 || port > 65535) {
23             throw new IllegalArgumentException("\83v\83\8d\83L\83V\82Ì\90Ý\92è\82ª\95s\93K\90Ø\82Å\82·");
24         }
25         this.host = host;
26         this.port = port;
27     }
28
29     public String getHost() {
30         return host;
31     }
32
33     public int getPort() {
34         return port;
35     }
36 }