.class public abstract Lka/d;
.super Ljava/lang/Object;
.source ""

# interfaces
.implements Ljava/lang/Runnable;
.implements Ljava/io/Serializable;


# instance fields
.field public r:Lka/a;

.field public s:Ljava/util/List;

.field public t:Ljava/lang/Thread;

.field public u:Lka/c;

.field public v:Z


# direct methods
.method public constructor <init>()V
    .registers 2

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    const/4 v0, 0x0

    iput-object v0, p0, Lka/d;->r:Lka/a;

    iput-object v0, p0, Lka/d;->s:Ljava/util/List;

    iput-object v0, p0, Lka/d;->t:Ljava/lang/Thread;

    iput-object v0, p0, Lka/d;->u:Lka/c;

    const/4 v0, 0x0

    iput-boolean v0, p0, Lka/d;->v:Z

    return-void
.end method


# virtual methods
.method public b(Lka/a;)V
    .registers 3

    iput-object p1, p0, Lka/d;->r:Lka/a;

    .line 1
    :try_start_2
    iget-object p1, p1, Lka/a;->s:Lka/c;

    .line 2
    iput-object p1, p0, Lka/d;->u:Lka/c;
    :try_end_6
    .catch Ljava/lang/ClassCastException; {:try_start_2 .. :try_end_6} :catch_14

    invoke-interface {p1}, Lka/c;->T()Z

    move-result p1

    if-eqz p1, :cond_13

    new-instance p1, Ljava/util/LinkedList;

    invoke-direct {p1}, Ljava/util/LinkedList;-><init>()V

    iput-object p1, p0, Lka/d;->s:Ljava/util/List;

    :cond_13
    return-void

    :catch_14
    new-instance p1, Lja/f;

    const-string v0, "config must implement interface AbstractSyslogConfigIF"

    invoke-direct {p1, v0}, Lja/f;-><init>(Ljava/lang/String;)V

    throw p1
.end method

.method public abstract d()V
.end method

.method public abstract e([B)V
.end method

.method public run()V
    .registers 8

    :catch_0
    :goto_0
    iget-boolean v0, p0, Lka/d;->v:Z

    if-eqz v0, :cond_11

    iget-object v0, p0, Lka/d;->s:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->isEmpty()Z

    move-result v0

    if-nez v0, :cond_d

    goto :goto_11

    :cond_d
    invoke-virtual {p0}, Lka/d;->d()V

    return-void

    :cond_11
    :goto_11
    iget-object v0, p0, Lka/d;->s:Ljava/util/List;

    monitor-enter v0

    :try_start_14
    new-instance v1, Ljava/util/LinkedList;

    iget-object v2, p0, Lka/d;->s:Ljava/util/List;

    invoke-direct {v1, v2}, Ljava/util/LinkedList;-><init>(Ljava/util/Collection;)V

    iget-object v2, p0, Lka/d;->s:Ljava/util/List;

    invoke-interface {v2}, Ljava/util/List;->clear()V

    monitor-exit v0
    :try_end_21
    .catchall {:try_start_14 .. :try_end_21} :catchall_5a

    :goto_21
    invoke-interface {v1}, Ljava/util/List;->isEmpty()Z

    move-result v0

    if-nez v0, :cond_50

    const/4 v0, 0x0

    invoke-virtual {v1, v0}, Ljava/util/LinkedList;->remove(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, [B

    :try_start_2e
    invoke-virtual {p0, v2}, Lka/d;->e([B)V

    iget-object v3, p0, Lka/d;->r:Lka/a;

    invoke-virtual {v3, v0}, Lka/a;->m(Z)V
    :try_end_36
    .catch Lja/f; {:try_start_2e .. :try_end_36} :catch_37

    goto :goto_21

    :catch_37
    move-exception v0

    iget-object v3, p0, Lka/d;->r:Lka/a;

    const/4 v4, 0x6

    .line 1
    iget-object v5, v3, Lka/a;->s:Lka/c;

    .line 2
    :try_start_3d
    new-instance v6, Ljava/lang/String;

    invoke-interface {v5}, Lja/b;->r()Ljava/lang/String;

    move-result-object v5

    invoke-direct {v6, v2, v5}, Ljava/lang/String;-><init>([BLjava/lang/String;)V
    :try_end_46
    .catch Ljava/io/UnsupportedEncodingException; {:try_start_3d .. :try_end_46} :catch_47

    goto :goto_4c

    :catch_47
    new-instance v6, Ljava/lang/String;

    invoke-direct {v6, v2}, Ljava/lang/String;-><init>([B)V

    .line 3
    :goto_4c
    invoke-virtual {v3, v4, v6, v0}, Lka/a;->b(ILjava/lang/String;Ljava/lang/Throwable;)V

    goto :goto_21

    :cond_50
    :try_start_50
    iget-object v0, p0, Lka/d;->u:Lka/c;

    invoke-interface {v0}, Lka/c;->Z()J

    move-result-wide v0

    invoke-static {v0, v1}, Ljava/lang/Thread;->sleep(J)V
    :try_end_59
    .catch Ljava/lang/InterruptedException; {:try_start_50 .. :try_end_59} :catch_0

    goto :goto_0

    :catchall_5a
    move-exception v1

    :try_start_5b
    monitor-exit v0
    :try_end_5c
    .catchall {:try_start_5b .. :try_end_5c} :catchall_5a

    throw v1
.end method
