| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| SyncEvent |
|
| 1.0;1 |
| 1 | /** | |
| 2 | * Copyright 2008 WebPhotos | |
| 3 | * | |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); | |
| 5 | * you may not use this file except in compliance with the License. | |
| 6 | * You may obtain a copy of the License at | |
| 7 | * | |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 | |
| 9 | * | |
| 10 | * Unless required by applicable law or agreed to in writing, software | |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, | |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| 13 | * See the License for the specific language governing permissions and | |
| 14 | * limitations under the License. | |
| 15 | */ | |
| 16 | /* | |
| 17 | * SyncEvent.java | |
| 18 | * | |
| 19 | * Created on 19 de Maio de 2006, 15:50 | |
| 20 | * | |
| 21 | * To change this template, choose Tools | Template Manager | |
| 22 | * and open the template in the editor. | |
| 23 | */ | |
| 24 | ||
| 25 | package net.sf.webphotos.sync; | |
| 26 | ||
| 27 | import java.util.EventObject; | |
| 28 | ||
| 29 | /** | |
| 30 | * Trabalha os eventos de sincronização através da classe | |
| 31 | * {@link java.util.EventObject EventObject}, utilizada nas funções connect e | |
| 32 | * disconnect de {@link net.sf.webphotos.sync.FTP.SyncObject SyncObject}. | |
| 33 | * @author guilherme | |
| 34 | */ | |
| 35 | public class SyncEvent extends EventObject { | |
| 36 | ||
| 37 | private boolean retrying; | |
| 38 | ||
| 39 | /** | |
| 40 | * Construtor da classse. | |
| 41 | * Cria uma nova instância de SyncEvent, recebe um Object e o envia para | |
| 42 | * a classe base (no caso {@link java.util.EventObject EventObject}). | |
| 43 | * Também seta o valor <i>false</i> para a variável retrying. | |
| 44 | * @param o Object para envio a classe base. | |
| 45 | */ | |
| 46 | public SyncEvent(Object o) { | |
| 47 | 0 | super(o); |
| 48 | 0 | retrying = false; |
| 49 | 0 | } |
| 50 | ||
| 51 | /** | |
| 52 | * Construtor da classse. | |
| 53 | * Cria uma nova instancia de SyncEvent, recebe um Object e o envia para | |
| 54 | * a classe base (no caso {@link java.util.EventObject EventObject}). | |
| 55 | * Recebe o valor para a variável retrying e o implementa. | |
| 56 | * @param o Object para envio a classe base. | |
| 57 | * @param retrying Valor lógico da variável retrying. | |
| 58 | */ | |
| 59 | public SyncEvent(Object o, boolean retrying) { | |
| 60 | 0 | super(o); |
| 61 | 0 | this.retrying = retrying; |
| 62 | 0 | } |
| 63 | ||
| 64 | /** | |
| 65 | * Retorna o valor da variável retrying. | |
| 66 | * @return Retorna a variável retrying. | |
| 67 | */ | |
| 68 | public boolean isRetrying() { | |
| 69 | 0 | return retrying; |
| 70 | } | |
| 71 | ||
| 72 | /** | |
| 73 | * Seta o valor da variável retrying. | |
| 74 | * @param retrying Variável lógica. | |
| 75 | */ | |
| 76 | public void setRetrying(boolean retrying) { | |
| 77 | 0 | this.retrying = retrying; |
| 78 | 0 | } |
| 79 | ||
| 80 | } |