|
TrueUpdate Manager Specification 0.1.5 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectnet.java.trueupdate.manager.spec.UpdateMessage
@Immutable public final class UpdateMessage
An immutable Value Object which gets exchanged between update agents and update managers in order to establish a protocol for the automated installation of application updates.
UpdateMessage.Type,
Serialized Form| Nested Class Summary | |
|---|---|
static class |
UpdateMessage.Builder
A builder for an update message. |
static class |
UpdateMessage.Type
The update message type. |
| Method Summary | |
|---|---|
ApplicationDescriptor |
applicationDescriptor()
Vends an application descriptor from the information in this update message. |
ArtifactDescriptor |
artifactDescriptor()
Returns the artifact descriptor. |
UpdateMessage |
artifactDescriptor(ArtifactDescriptor artifactDescriptor)
Returns an update message with the given artifact descriptor. |
static UpdateMessage.Builder |
builder()
Returns a new builder for an update message. |
URI |
currentLocation()
Returns the current location. |
UpdateMessage |
currentLocation(URI currentLocation)
Returns an update message with the given current location. |
boolean |
equals(Object obj)
Returns true if and only if the given object is an
UpdateMessage with equal properties. |
UpdateMessage |
failureResponse(Exception ex)
Returns a failure response for this update message with the string representation of the given exception as the status, swapped from/to URIs and an updated time stamp. |
URI |
from()
Returns the update message sender. |
UpdateMessage |
from(URI from)
Returns an update message with the given update message sender. |
int |
hashCode()
Returns a hash code which is consistent with equals(Object). |
String |
status()
Returns the status text. |
UpdateMessage |
status(String status)
Returns an update message with the given status text. |
UpdateMessage |
successResponse()
Returns a success response for this update message with an empty status, swapped from/to URIs and an updated time stamp. |
long |
timestamp()
Returns the update message timestamp. |
UpdateMessage |
timestamp(long timestamp)
Returns an update message with the given update message timestamp. |
URI |
to()
Returns the update message recipient. |
UpdateMessage |
to(URI to)
Returns an update message with the given update message recipient. |
String |
toString()
Returns a human readable string representation of this object. |
UpdateMessage.Type |
type()
Returns the update message type. |
UpdateMessage |
type(UpdateMessage.Type type)
Returns an update message with the given update message type. |
UpdateMessage.Builder |
update()
Returns a new builder with all properties set from this instance. |
UpdateDescriptor |
updateDescriptor()
Vends an update descriptor from the information in this update message. |
URI |
updateLocation()
Returns the update location. |
UpdateMessage |
updateLocation(URI newLocation)
Returns an update message with the given update location. |
String |
updateVersion()
Returns the update version. |
UpdateMessage |
updateVersion(String updateVersion)
Returns an update message with the given update version. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public ApplicationDescriptor applicationDescriptor()
public ArtifactDescriptor artifactDescriptor()
public UpdateMessage artifactDescriptor(ArtifactDescriptor artifactDescriptor)
public static UpdateMessage.Builder builder()
timestamp is the creation
time of the update message in milliseconds since the epoch.
The default value for the properties status and
updateVersion is an empty string.
The default value for the property location is an empty URI.
The default value for the property updateLocation is the
effective value of the property location.
public URI currentLocation()
public UpdateMessage currentLocation(URI currentLocation)
public boolean equals(Object obj)
true if and only if the given object is an
UpdateMessage with equal properties.
equals in class Objectpublic UpdateMessage failureResponse(Exception ex)
*_REQUEST.
If no, then an UnsupportedOperationException gets thrown.
If yes, then a new update message of the corresponding type
*_FAILURE_RESPONSE gets returned with the string representation
of the given exception as the status and an updated time stamp.
public URI from()
public UpdateMessage from(URI from)
public int hashCode()
equals(Object).
hashCode in class Objectpublic String status()
public UpdateMessage status(String status)
public UpdateMessage successResponse()
*_REQUEST.
If no, then an UnsupportedOperationException gets thrown.
If yes, then a new update message of the corresponding type
*_SUCCESS_RESPONSE gets returned with an empty status and an
updated time stamp.
public long timestamp()
public UpdateMessage timestamp(long timestamp)
public URI to()
public UpdateMessage to(URI to)
public String toString()
toString in class Objectpublic UpdateMessage.Type type()
public UpdateMessage type(UpdateMessage.Type type)
public UpdateMessage.Builder update()
public UpdateDescriptor updateDescriptor()
public URI updateLocation()
currentLocation(), then the update should happen
in-place.
public UpdateMessage updateLocation(URI newLocation)
public String updateVersion()
public UpdateMessage updateVersion(String updateVersion)
|
TrueUpdate Manager Specification 0.1.5 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||