// Path: ddp-client/src/main/java/io/advantageous/ddp/DDPError.java
// public class DDPError {
// 
//     private final int error;
// 
//     private final String reason;
// 
//     private final String details;
// 
//     public DDPError(final int error, final String reason, final String details) {
//         this.error = error;
//         this.reason = reason;
//         this.details = details;
//     }
// 
//     public int getError() {
//         return error;
//     }
// 
//     public String getReason() {
//         return reason;
//     }
// 
//     public String getDetails() {
//         return details;
//     }
// 
//     @Override
//     public String toString() {
//         return "DDPError{" +
//                 "error=" + error +
//                 ", reason='" + reason + '\'' +
//                 ", details='" + details + '\'' +
//                 '}';
//     }
// }


import io.advantageous.ddp.DDPError;
        this(subscriptionName, null, clazz, callback);
    }

    public Subscription(String subscriptionName, Object[] params, Callback callback) {
        this(subscriptionName, params, Object.class, callback);
    }

    public String getSubscriptionName() {
        return subscriptionName;
    }

    public Object[] getParams() {
        return params;
    }

    public Class getClazz() {
        return clazz;
    }

    public Callback getCallback() {
        return callback;
    }

    /**
     * Callback run when a subscription is handled.
     */
    public interface Callback {

        void onReady(String subscriptionId);

// Path: ddp-client/src/main/java/io/advantageous/ddp/DDPError.java
// public class DDPError {
// 
//     private final int error;
// 
//     private final String reason;
// 
//     private final String details;
// 
//     public DDPError(final int error, final String reason, final String details) {
//         this.error = error;
//         this.reason = reason;
//         this.details = details;
//     }
// 
//     public int getError() {
//         return error;
//     }
// 
//     public String getReason() {
//         return reason;
//     }
// 
//     public String getDetails() {
//         return details;
//     }
// 
//     @Override
//     public String toString() {
//         return "DDPError{" +
//                 "error=" + error +
//                 ", reason='" + reason + '\'' +
//                 ", details='" + details + '\'' +
//                 '}';
//     }
// }


// Path: ddp-client/src/main/java/io/advantageous/ddp/subscription/Subscription.java
import io.advantageous.ddp.DDPError;

        this(subscriptionName, null, clazz, callback);
    }

    public Subscription(String subscriptionName, Object[] params, Callback callback) {
        this(subscriptionName, params, Object.class, callback);
    }

    public String getSubscriptionName() {
        return subscriptionName;
    }

    public Object[] getParams() {
        return params;
    }

    public Class getClazz() {
        return clazz;
    }

    public Callback getCallback() {
        return callback;
    }

    /**
     * Callback run when a subscription is handled.
     */
    public interface Callback {

        void onReady(String subscriptionId);

        void onFailure(String subscriptionId, DDPError error);