|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ch.elca.el4j.util.socketstatistics.ConnectionStatistics
public class ConnectionStatistics
Keeps statistics of one (open / closed) socket connection.
Constructor Summary | |
---|---|
ConnectionStatistics(long socketID)
Constructor. |
Method Summary | |
---|---|
void |
addbytesrecv(int nrofbytes)
Add a certain amounts of received bytes to socket stats. |
void |
addbytessent(int nrofbytes)
Add a certain amounts of sent bytes to socket stats. |
int |
compareTo(ConnectionStatistics o)
Compare using destroyed / closed date of socket / ConnectionStatics. |
boolean |
equals(Object o)
|
long |
getBytesReceived()
Getter for number of received bytes. |
long |
getBytesSent()
Getter for number of sent bytes. |
String |
getCreatedDate()
External getter for sockets creation date. |
protected Date |
getCreatedDateInt()
Internal getter for sockets creation date. |
String |
getDestroyedDate()
External getter for sockets destroyed / close date. |
protected Date |
getDestroyedDateInt()
Internal getter for sockets destroyed / close date. |
int |
getLocalPort()
Getter for sockets local port. |
String |
getRemoteAdress()
Getter for sockets remote address. |
int |
getRemotePort()
Getter for sockets remote port. |
long |
getSocketID()
Getter for sockets id. |
protected String |
getStatistics()
Return stats of socket as string. |
protected String |
getStatisticsCSV()
Return stats of socket as string in csv format. |
int |
hashCode()
|
void |
setDestroyed()
Mark monitored socket as closed / destroyed. |
protected void |
setDestroyedDateInt()
Sets socket as destroyed / closed with date = now. |
void |
setLocalPort(int lp)
Setter for sockets local port. |
void |
setRemoteAdress(InetAddress ra)
Setter for sockets remote address. |
void |
setRemotePort(int rp)
Setter for sockets remote port. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConnectionStatistics(long socketID)
socketID
- (unique) id to be assigned to socketMethod Detail |
---|
public void addbytessent(int nrofbytes)
nrofbytes
- number of sent bytespublic void addbytesrecv(int nrofbytes)
nrofbytes
- number of received bytespublic long getBytesReceived()
public long getBytesSent()
public void setRemoteAdress(InetAddress ra)
ra
- sockets remote addresspublic String getRemoteAdress()
public void setRemotePort(int rp)
rp
- sockets remote portpublic int getRemotePort()
public void setLocalPort(int lp)
lp
- sockets local portpublic int getLocalPort()
public void setDestroyed()
public String getDestroyedDate()
protected Date getDestroyedDateInt()
protected void setDestroyedDateInt()
public String getCreatedDate()
protected Date getCreatedDateInt()
public long getSocketID()
protected String getStatistics()
protected String getStatisticsCSV()
public int compareTo(ConnectionStatistics o)
compareTo
in interface Comparable<ConnectionStatistics>
public int hashCode()
hashCode
in class Object
public boolean equals(Object o)
equals
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |