TrueUpdate Manager Specification 0.1.6

net.java.trueupdate.manager.spec
Enum UpdateMessage.Type

java.lang.Object
  extended by java.lang.Enum<UpdateMessage.Type>
      extended by net.java.trueupdate.manager.spec.UpdateMessage.Type
All Implemented Interfaces:
Serializable, Comparable<UpdateMessage.Type>
Enclosing class:
UpdateMessage

public static enum UpdateMessage.Type
extends Enum<UpdateMessage.Type>

The update message type. The communication protocol works as follows:

  1. The update agent needs to send a SUBSCRIPTION_REQUEST in order to subscribe to the list of recipients for update announcements for the application.
  2. The update manager then needs to send a SUBSCRIPTION_SUCCESS_RESPONSE or a SUBSCRIPTION_FAILURE_RESPONSE.
  3. Upon a successful subscription, the update manager needs to send an UPDATE_NOTICE for every update.
  4. The update agent may then send an INSTALLATION_REQUEST.
  5. The update manager then needs to install the application update and send an INSTALLATION_SUCCESS_RESPONSE or an INSTALLATION_FAILURE_RESPONSE.
  6. The update agent may send an UNSUBSCRIPTION_REQUEST or UNSUBSCRIPTION_NOTICE in order to unsubscribe from the list of recipients for update announcements for the application.
  7. If and only if the message is an UNSUBSCRIPTION_REQUEST, then the update manager needs to send an UNSUBSCRIPTION_SUCCESS_RESPONSE or an UNSUBSCRIPTION_FAILURE_RESPONSE.
  8. Finally, the update manager may send itself a SUBSCRIPTION_NOTICE for every subscription before shutting down in order to persist them. Upon startup, the manager then needs to process the messages without responding to the update agents.

Note that messages may get lost or duplicated and no timeout is defined.


Enum Constant Summary
INSTALLATION_FAILURE_RESPONSE
           
INSTALLATION_REQUEST
           
INSTALLATION_SUCCESS_RESPONSE
           
SUBSCRIPTION_FAILURE_RESPONSE
           
SUBSCRIPTION_NOTICE
           
SUBSCRIPTION_REQUEST
           
SUBSCRIPTION_SUCCESS_RESPONSE
           
UNSUBSCRIPTION_FAILURE_RESPONSE
           
UNSUBSCRIPTION_NOTICE
           
UNSUBSCRIPTION_REQUEST
           
UNSUBSCRIPTION_SUCCESS_RESPONSE
           
UPDATE_NOTICE
           
 
Method Summary
 UpdateMessage.Type failureResponse()
          Returns the corresponding *_FAILURE_RESPONSE if and only if this is a *_REQUEST type.
abstract  boolean forManager()
          Returns true if and only if messages of this type should be processed by an update manager.
 UpdateMessage.Type successResponse()
          Returns the corresponding *_SUCCESS_RESPONSE if and only if this is a *_REQUEST type.
static UpdateMessage.Type valueOf(String name)
          Returns the enum constant of this type with the specified name.
static UpdateMessage.Type[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

INSTALLATION_FAILURE_RESPONSE

public static final UpdateMessage.Type INSTALLATION_FAILURE_RESPONSE

INSTALLATION_REQUEST

public static final UpdateMessage.Type INSTALLATION_REQUEST

INSTALLATION_SUCCESS_RESPONSE

public static final UpdateMessage.Type INSTALLATION_SUCCESS_RESPONSE

SUBSCRIPTION_FAILURE_RESPONSE

public static final UpdateMessage.Type SUBSCRIPTION_FAILURE_RESPONSE

SUBSCRIPTION_NOTICE

public static final UpdateMessage.Type SUBSCRIPTION_NOTICE

SUBSCRIPTION_REQUEST

public static final UpdateMessage.Type SUBSCRIPTION_REQUEST

SUBSCRIPTION_SUCCESS_RESPONSE

public static final UpdateMessage.Type SUBSCRIPTION_SUCCESS_RESPONSE

UNSUBSCRIPTION_FAILURE_RESPONSE

public static final UpdateMessage.Type UNSUBSCRIPTION_FAILURE_RESPONSE

UNSUBSCRIPTION_NOTICE

public static final UpdateMessage.Type UNSUBSCRIPTION_NOTICE

UNSUBSCRIPTION_REQUEST

public static final UpdateMessage.Type UNSUBSCRIPTION_REQUEST

UNSUBSCRIPTION_SUCCESS_RESPONSE

public static final UpdateMessage.Type UNSUBSCRIPTION_SUCCESS_RESPONSE

UPDATE_NOTICE

public static final UpdateMessage.Type UPDATE_NOTICE
Method Detail

failureResponse

public UpdateMessage.Type failureResponse()
Returns the corresponding *_FAILURE_RESPONSE if and only if this is a *_REQUEST type. Otherwise throws an UnsupportedOperationException.


forManager

public abstract boolean forManager()
Returns true if and only if messages of this type should be processed by an update manager.


successResponse

public UpdateMessage.Type successResponse()
Returns the corresponding *_SUCCESS_RESPONSE if and only if this is a *_REQUEST type. Otherwise throws an UnsupportedOperationException.


valueOf

public static UpdateMessage.Type valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

values

public static UpdateMessage.Type[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (UpdateMessage.Type c : UpdateMessage.Type.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

TrueUpdate Manager Specification 0.1.6

Copyright © 2013 Stimulus Software. All rights reserved.