|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.otfeed.OTConnectionSpec
public class OTConnectionSpec
Connection Specification. Encapsulates parameters of a connection to the Opentick server. This includes username/password, connection addresses, et al. This object has value semantics, i.e. it compares to true iff all its properties compare to true. Note that it does deep copy of Hosts and re-orders them according to the natural order. Therefore, order in which host set was populated does not matter for comparison purposes.
| Field Summary | |
|---|---|
static long |
DEFAULT_HEARTBEAT_INTERVAL
|
| Constructor Summary | |
|---|---|
OTConnectionSpec()
Creates empty connection specification. |
|
OTConnectionSpec(OTConnectionSpec other)
Creates connection specification by cloning the model one. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
|
java.lang.Long |
getHeartbeatInterval()
Heartbeat interval in millis. |
java.util.Set<OTHost> |
getHosts()
Set of hosts to connect. |
java.lang.String |
getHostsString()
Provides convenient access to getHosts() property:
allows user to set/get it as a string value
- a comma-separated list of host addresses. |
java.lang.String |
getPassword()
Password for accessing Opentick datat. |
java.lang.String |
getUsername()
Username for accessing Opentick data. |
int |
hashCode()
|
void |
setHeartbeatInterval(java.lang.Long heartbeatInterval)
Sets the heartbeat interval (in millis). |
void |
setHosts(java.util.Set<OTHost> val)
Sets hosts to connect. |
void |
setHostsString(java.lang.String val)
Sets setHosts(java.util.Set property by parsing comma-separated list of
host addresses. |
void |
setPassword(java.lang.String password)
Sets the password of the Opentick account. |
void |
setUsername(java.lang.String username)
Sets the user name of the Opentick account. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final long DEFAULT_HEARTBEAT_INTERVAL
| Constructor Detail |
|---|
public OTConnectionSpec()
public OTConnectionSpec(OTConnectionSpec other)
other - model specs.| Method Detail |
|---|
public java.lang.String getUsername()
public void setUsername(java.lang.String username)
username - namepublic java.lang.String getPassword()
public void setPassword(java.lang.String password)
password - public java.util.Set<OTHost> getHosts()
public void setHosts(java.util.Set<OTHost> val)
val - public java.lang.String getHostsString()
getHosts() property:
allows user to set/get it as a string value
- a comma-separated list of host addresses.
For example:
spec.setHostsString("feed1.opentick.com:10015,feed2.opentick.com:10010");
hosts property.
public void setHostsString(java.lang.String val)
throws java.lang.IllegalArgumentException
setHosts(java.util.Set) property by parsing comma-separated list of
host addresses.
val - value to parse.
java.lang.IllegalArgumentException - if can not parse spring.public java.lang.Long getHeartbeatInterval()
public void setHeartbeatInterval(java.lang.Long heartbeatInterval)
heartbeatInterval - new heartbeat interval.public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||