org.indy
Interface IndyComponentListener


public interface IndyComponentListener

A listener interface for receiving notification of status changes and read / write operations in an IndyComponent. Classes implementing this interface can register their interest in a given IndyComponent instance using the interface.

Version:
1.0
Author:
Owen Green
See Also:
IndyComponent, IndyComponent.addComponentListener(IndyComponentListener)

Method Summary
 void onBeginWork(IndyComponent sender, IndyComponent.WorkMode workMode, int size)
          Signals that the IndyComponent passed in sender has commenced a chunk of work of the given IndyComponent.WorkMode that will entail processing size bytes.
 void onEndWork(IndyComponent sender, IndyComponent.WorkMode workMode)
          Signals that a chunk of work of the given IndyComponent.WorkMode has been compoleted by the IndyComponent sender
 void onStatus(IndyComponent sender, Status status, java.lang.String statusText)
          Signals a state change in the IndyComponent passed in the sender parameter.
 void onWork(IndyComponent sender, IndyComponent.WorkMode workMode, int workCount)
          Signals that a piece of work of a given IndyComponent.WorkMode undertaken by the IndyComponent sender has progressed by workCount bytes.
 

Method Detail

onStatus

public void onStatus(IndyComponent sender,
                     Status status,
                     java.lang.String statusText)
Signals a state change in the IndyComponent passed in the sender parameter. The new state is an instance of Status, and a string representation of this information is also provided which can be fed back to the user.
Parameters:
sender - The IndyComponent whose state has changed.
status - The new Status of the component.
statusText - A friendly string represention of the state change.
See Also:
IndyComponent, Status

onBeginWork

public void onBeginWork(IndyComponent sender,
                        IndyComponent.WorkMode workMode,
                        int size)
Signals that the IndyComponent passed in sender has commenced a chunk of work of the given IndyComponent.WorkMode that will entail processing size bytes. If size=0 then it can be ignored.
Parameters:
sender - The IndyComponent starting a chunk of work.
workMode - The WorkMode of this work
workCountMax - The size of the job.
See Also:
IndyComponent, IndyComponent.WorkMode

onWork

public void onWork(IndyComponent sender,
                   IndyComponent.WorkMode workMode,
                   int workCount)
Signals that a piece of work of a given IndyComponent.WorkMode undertaken by the IndyComponent sender has progressed by workCount bytes.
Parameters:
sender - The IndyComponent that is working
workMode - The WorkMode of the work underway.
workCount - The progress made.
See Also:
IndyComponent, IndyComponent.WorkMode

onEndWork

public void onEndWork(IndyComponent sender,
                      IndyComponent.WorkMode workMode)
Signals that a chunk of work of the given IndyComponent.WorkMode has been compoleted by the IndyComponent sender
Parameters:
sender - The IndyComponent that has completed work
workMode - The WorkMode of the completed work.
See Also:
IndyComponent, IndyComponent.WorkMode


Copyright © 2002-2002 IndyJ. All Rights Reserved.