All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ru.dezhik.sms.sender.api.smsru.senders.SMSRuSendersHandler Maven / Gradle / Ivy

There is a newer version: 0.1.3
Show newest version
package ru.dezhik.sms.sender.api.smsru.senders;

import java.util.List;
import java.util.StringTokenizer;

import org.apache.http.NameValuePair;

import ru.dezhik.sms.sender.api.smsru.AbstractSMSRuApiHandler;

/**
 * @author ilya.dezhin
 */
public class SMSRuSendersHandler extends AbstractSMSRuApiHandler {
    @Override
    public String getMethodPath() {
        return "/my/senders";
    }

    @Override
    public void validate(SMSRuSendersRequest request) throws IllegalArgumentException {
    }

    @Override
    public void appendParams(SMSRuSendersRequest request, List params) {
    }

    @Override
    public SMSRuSendersResponse parseResponse(SMSRuSendersRequest request, String responseStr) {
        final SMSRuSendersResponse response = new SMSRuSendersResponse();
        final StringTokenizer tokenizer = tokenizeResponse(responseStr);
        parseAndSetStatus(request, response, tokenizer);
        while (tokenizer.hasMoreTokens()) {
            response.addSenders(tokenizer.nextToken());
        }
        return response;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy