// This file is part of me.christopherdavis.beanstalkc
// Copyright: (c) 2014 Christopher Davis <http://christopherdavis.me>
// License: MIT http://opensource.org/licenses/MIT

package me.christopherdavis.beanstalkc;

/**
 * The default implementation of Client.
 *
 * @since   0.1
 * @author  Christopher Davis <http://christopherdavis.me>
 */
class DefaultClient implements Client
{
    private static final int DEFAULT_DELAY = 0;
    private static final int DEFAULT_TTR = 60; // 1 minute
    private static final int DEFAULT_PRIORITY = 1024;

    /**
     * @see     Client#put
     */
    public Job put(int priority, int delay, int ttr, byte[] data) throws BeanstalkcException
    {
        return null;
    }

    /**
     * @see     Client#put
     */
    public Job put(byte[] data) throws BeanstalkcException
    {
        return null;
    }

    /**
     * @see     Client#use
     */
    public boolean use(String tube) throws BeanstalkcException
    {
        return false;
    }

    /**
     * @see     Client#reserve
     */
    public Job reserve() throws BeanstalkcException
    {
        return null;
    }

    /**
     * @see     Client#reserve
     */
    public Job reserve(int timeout) throws BeanstalkcException
    {
        return null;
    }


    /**
     * @see     Client#delete
     */
    public boolean delete(Job job) throws BeanstalkcException
    {
        return false;
    }


    /**
     * @see     Client#delete
     */
    public boolean delete(int job_id) throws BeanstalkcException
    {
        return false;
    }

    /**
     * @see     Client#release
     */
    public boolean release(Job job, int priority, int delay) throws BeanstalkcException
    {
        return false;
    }

    /**
     * @see     Client#release
     */
    public boolean release(int job_id, int priority, int delay) throws BeanstalkcException
    {
        return false;
    }

    /**
     * @see     Client#release
     */
    public boolean release(Job job) throws BeanstalkcException
    {
        return false;
    }

    /**
     * @see     Client#release
     */
    public boolean release(int job_id) throws BeanstalkcException
    {
        return false;
    }

    /**
     * @see     Client#bury
     */
    public boolean bury(Job job, int priority) throws BeanstalkcException
    {
        return false;
    }


    /**
     * @see     Client#bury
     */
    public boolean bury(int job_id, int priority) throws BeanstalkcException
    {
        return false;
    }

    /**
     * @see     Client#bury
     */
    public boolean bury(Job job) throws BeanstalkcException
    {
        return false;
    }

    /**
     * @see     Client#bury
     */
    public boolean bury(int job_id) throws BeanstalkcException
    {
        return false;
    }

    /**
     * @see     Client#bury
     */
    public boolean touch(Job job) throws BeanstalkcException
    {
        return false;
    }

    /**
     * @see     Client#touch
     */
    public boolean touch(int job_id) throws BeanstalkcException
    {
        return false;
    }

    /**
     * @see     Client#touch
     */
    public int watch(String tube) throws BeanstalkcException
    {
        return 0;
    }

    /**
     * @see     Client#ignore
     */
    public int ignore(String tube) throws BeanstalkcException
    {
        return 0;
    }
}

@@ -211,16 +211,78 @@
 talkc;%0A%0A
+import me.christopherdavis.beanstalkc.command.PutJobCommand;%0A%0A
 /**%0A * T
@@ -602,16 +602,160 @@
  1024;%0A%0A
+    private Adapter adapter;%0A%0A    public DefaultClient(Adapter adapter) throws BeanstalkcException%0A    %7B%0A        this.adapter = adapter;%0A    %7D%0A%0A
     /**%0A
@@ -895,36 +895,99 @@
 %0A        return 
-null
+this.adapter.perform(new PutJobCommand(priority, delay, ttr, data))
 ;%0A    %7D%0A%0A    /**
@@ -1094,36 +1094,87 @@
 %0A        return 
-null
+put(DEFAULT_PRIORITY, DEFAULT_DELAY, DEFAULT_TTR, data)
 ;%0A    %7D%0A%0A    /**

Use PutJobCommand in DefaultClient