|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.tranche.servers.ServerEvent
org.tranche.servers.ServerMessageEvent
org.tranche.servers.ServerMessageDownEvent
public class ServerMessageDownEvent
Representation of a message being received from a server.
| Field Summary | |
|---|---|
static int |
TYPE_COMPLETED
Code for a completed download message. |
static int |
TYPE_FAILED
Code for a failed download message. |
static int |
TYPE_PROGRESS
Code for progress on a download message. |
static int |
TYPE_STARTED
Code for a started download message. |
| Fields inherited from class org.tranche.servers.ServerEvent |
|---|
AUTO_BAN, AUTO_UNBAN, CALLBACK, CONNECT, MESSAGE, USER_BAN, USER_UNBAN |
| Constructor Summary | |
|---|---|
ServerMessageDownEvent(java.lang.String url,
long callbackId,
int type)
|
|
ServerMessageDownEvent(java.lang.String url,
long callbackId,
int type,
long bytesToDownload)
|
|
ServerMessageDownEvent(java.lang.String url,
long callbackId,
int type,
long bytesToDownload,
long bytesDownloaded)
|
|
| Method Summary | |
|---|---|
long |
getBytesDownloaded()
Gets the number of bytes that have been downloaded. |
long |
getBytesToDownload()
Gets the number of bytes that are to be downloaded. |
int |
getType()
Returns the type code. |
java.lang.String |
getTypeString()
Returns the type in a human-readable format. |
java.lang.String |
toString()
Gets a human-readable description of this event. |
| Methods inherited from class org.tranche.servers.ServerMessageEvent |
|---|
getCallbackId |
| Methods inherited from class org.tranche.servers.ServerEvent |
|---|
getTimestamp, getUrl |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int TYPE_STARTED
Code for a started download message.
public static final int TYPE_PROGRESS
Code for progress on a download message.
public static final int TYPE_COMPLETED
Code for a completed download message.
public static final int TYPE_FAILED
Code for a failed download message.
| Constructor Detail |
|---|
public ServerMessageDownEvent(java.lang.String url,
long callbackId,
int type)
url - callbackId - type -
public ServerMessageDownEvent(java.lang.String url,
long callbackId,
int type,
long bytesToDownload)
url - callbackId - type - bytesToDownload -
public ServerMessageDownEvent(java.lang.String url,
long callbackId,
int type,
long bytesToDownload,
long bytesDownloaded)
url - callbackId - type - bytesToDownload - bytesDownloaded - | Method Detail |
|---|
public int getType()
Returns the type code.
getType in class ServerEventpublic java.lang.String getTypeString()
Returns the type in a human-readable format.
getTypeString in class ServerEventpublic long getBytesToDownload()
Gets the number of bytes that are to be downloaded.
public long getBytesDownloaded()
Gets the number of bytes that have been downloaded.
public java.lang.String toString()
Gets a human-readable description of this event.
toString in class ServerMessageEvent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||