// 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;
/*
 * Copyright (C) 2014. Geoffrey Chandler.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package io.advantageous.ddp.subscription;


/**
 * This object represents a subscription to a meteor collection.
 *
 * @author geoffc@gmail.com
 * @since 2/15/14 at 2:58 PM.
 */
public class Subscription {

    private final String subscriptionName;

    private final Object[] params;

    private final Class clazz;

    private final Callback callback;

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

    public Subscription(String subscriptionName) {
        this(subscriptionName, null, Object.class, null);
    }

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

    public Subscription(String subscriptionName, Class clazz) {
// 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;

/*
 * Copyright (C) 2014. Geoffrey Chandler.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package io.advantageous.ddp.subscription;


/**
 * This object represents a subscription to a meteor collection.
 *
 * @author geoffc@gmail.com
 * @since 2/15/14 at 2:58 PM.
 */
public class Subscription {

    private final String subscriptionName;

    private final Object[] params;

    private final Class clazz;

    private final Callback callback;

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

    public Subscription(String subscriptionName) {
        this(subscriptionName, null, Object.class, null);
    }

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

    public Subscription(String subscriptionName, Class clazz) {
        this(subscriptionName, null, clazz, null);