public class AccessPoint
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_HOST |
static int |
DEFAULT_PORT |
protected java.lang.String |
host |
protected int |
port |
protected java.lang.String |
protocol |
| Constructor and Description |
|---|
AccessPoint()
Create a new AccessPoint
|
AccessPoint(AccessPoint accessPoint) |
AccessPoint(java.lang.String protocol,
java.lang.String host,
int port)
Create new access point with given values
|
| Modifier and Type | Method and Description |
|---|---|
static AccessPoint |
create(java.lang.String accessString)
Create an access point from a formatted string
|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getHost()
Get the host of this access point
|
int |
getPort()
Get the port of this access point
|
java.lang.String |
getProtocol()
Get the protocol of this access point
|
int |
hashCode() |
boolean |
isEmpty()
Check is the access point is empty
|
void |
setHost(java.lang.String host)
Set the host form this access point
|
void |
setPort(int port)
Set the port for this access point
|
void |
setProtocol(java.lang.String protocol)
Set the protocol for this access point
|
java.lang.String |
toString()
Format the access point as a string value
|
public static final int DEFAULT_PORT
public static final java.lang.String DEFAULT_HOST
protected java.lang.String protocol
protected int port
protected java.lang.String host
public AccessPoint()
public AccessPoint(java.lang.String protocol,
java.lang.String host,
int port)
protocol - Protocol of the access pointhost - Host of the access pointport - Port on which the broker is listening topublic AccessPoint(AccessPoint accessPoint)
public static AccessPoint create(java.lang.String accessString)
accessString - Formatted access stringpublic java.lang.String getProtocol()
public java.lang.String getHost()
public int getPort()
public void setPort(int port)
port - The port to setpublic void setProtocol(java.lang.String protocol)
protocol - The protocol to setpublic void setHost(java.lang.String host)
host - The host to setpublic boolean isEmpty()
public java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object