public class PortMapper extends Object
Modifier and Type | Field and Description |
---|---|
static String |
SVC_BOB |
static String |
SVC_CONSOLE |
static String |
SVC_EEPSITE |
static String |
SVC_HTTP_PROXY |
static String |
SVC_HTTPS_CONSOLE |
static String |
SVC_HTTPS_PROXY |
static String |
SVC_I2CP
not necessary, already in config?
|
static String |
SVC_I2CP_SSL |
static String |
SVC_IRC |
static String |
SVC_POP |
static String |
SVC_SAM |
static String |
SVC_SAM_SSL |
static String |
SVC_SAM_UDP |
static String |
SVC_SMTP |
static String |
SVC_SOCKS |
static String |
SVC_TAHOE |
Constructor and Description |
---|
PortMapper(I2PAppContext context) |
Modifier and Type | Method and Description |
---|---|
String |
getActualHost(String service,
String def)
Get the actual host for a service.
|
String |
getHost(String service,
String def)
Get the registered host for a service.
|
int |
getPort(String service)
Get the registered port for a service
|
int |
getPort(String service,
int def)
Get the registered port for a service
|
boolean |
register(String service,
int port)
Add the service
|
boolean |
register(String service,
String host,
int port)
Add the service
|
void |
renderStatusHTML(Writer out)
For debugging only
|
void |
unregister(String service)
Remove the service
|
public static final String SVC_CONSOLE
public static final String SVC_HTTPS_CONSOLE
public static final String SVC_HTTP_PROXY
public static final String SVC_HTTPS_PROXY
public static final String SVC_EEPSITE
public static final String SVC_IRC
public static final String SVC_SOCKS
public static final String SVC_TAHOE
public static final String SVC_SMTP
public static final String SVC_POP
public static final String SVC_SAM
public static final String SVC_SAM_UDP
public static final String SVC_SAM_SSL
public static final String SVC_BOB
public static final String SVC_I2CP
public static final String SVC_I2CP_SSL
public PortMapper(I2PAppContext context)
context
- unused for nowpublic boolean register(String service, int port)
port
- > 0public boolean register(String service, String host, int port)
port
- > 0public void unregister(String service)
public int getPort(String service)
public int getPort(String service, int def)
def
- defaultpublic String getHost(String service, String def)
def
- defaultpublic String getActualHost(String service, String def)
def
- defaultpublic void renderStatusHTML(Writer out) throws IOException
IOException