TrueUpdate Agent Specification 0.7

net.java.trueupdate.agent.spec
Class UpdateAgentListener

java.lang.Object
  extended by net.java.trueupdate.agent.spec.UpdateAgentListener

public class UpdateAgentListener
extends Object

Listens to events from the update agent.

Author:
Christian Schlichtherle

Constructor Summary
UpdateAgentListener()
           
 
Method Summary
protected  void log(LogRecord record)
          Logs the given record.
protected  void log(UpdateAgentEvent event)
          Logs the enclosed log records in the given event.
 void onInstallationFailureResponse(UpdateAgentEvent event)
          Processes an installation failure response.
 void onInstallationSuccessResponse(UpdateAgentEvent event)
          Processes an installation success response.
 void onProgressNotice(UpdateAgentEvent event)
          Processes a progress notice.
 void onRedeploymentRequest(UpdateAgentEvent event)
          Responds to a redeployment request.
 void onSubscriptionResponse(UpdateAgentEvent event)
          Processes a subscription response.
 void onUpdateNotice(UpdateAgentEvent event)
          Responds to an update available notice.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UpdateAgentListener

public UpdateAgentListener()
Method Detail

log

protected void log(LogRecord record)
Logs the given record. The implementation in the class UpdateAgentListener does nothing. Override this method in order to notify the user about the update progress.

This method must return quickly or otherwise a timeout may occur which would cause the update transaction to roll back!


log

protected void log(UpdateAgentEvent event)
Logs the enclosed log records in the given event. This method forwards the call to log(LogRecord) for each enclosed log record.

This method must return quickly or otherwise a timeout may occur which would cause the update transaction to roll back!


onInstallationFailureResponse

public void onInstallationFailureResponse(UpdateAgentEvent event)
                                   throws Exception
Processes an installation failure response. The implementation in the class UpdateAgentListener just logs any enclosed messages.

Throws:
Exception
See Also:
log(UpdateAgentEvent)

onInstallationSuccessResponse

public void onInstallationSuccessResponse(UpdateAgentEvent event)
                                   throws Exception
Processes an installation success response.

The implementation in the class UpdateAgentListener just logs any enclosed messages.

Throws:
Exception
See Also:
log(UpdateAgentEvent)

onProgressNotice

public void onProgressNotice(UpdateAgentEvent event)
                      throws Exception
Processes a progress notice.

The implementation in the class UpdateAgentListener just logs any enclosed messages.

Throws:
Exception
See Also:
log(UpdateAgentEvent)

onRedeploymentRequest

public void onRedeploymentRequest(UpdateAgentEvent event)
                           throws Exception
Responds to a redeployment request. This method must quickly respond to the update manager or otherwise a timeout may occur which would cause the update transaction to roll back!

The implementation in the class UpdateAgentListener logs any enclosed messages and sends a positive response.

Throws:
Exception
See Also:
log(UpdateAgentEvent)

onSubscriptionResponse

public void onSubscriptionResponse(UpdateAgentEvent event)
                            throws Exception
Processes a subscription response.

The implementation in the class UpdateAgentListener just logs any enclosed messages.

Throws:
Exception
See Also:
log(UpdateAgentEvent)

onUpdateNotice

public void onUpdateNotice(UpdateAgentEvent event)
                    throws Exception
Responds to an update available notice.

The implementation in the class UpdateAgentListener logs any enclosed messages and sends an installation request.

Throws:
Exception
See Also:
log(UpdateAgentEvent)

TrueUpdate Agent Specification 0.7

Copyright © 2013 Schlichtherle IT Services. All rights reserved.