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

org.asteriskjava.pbx.asterisk.wrap.response.CommandResponse Maven / Gradle / Ivy

There is a newer version: 3.41.0
Show newest version
package org.asteriskjava.pbx.asterisk.wrap.response;

import java.util.Collections;
import java.util.List;

public class CommandResponse extends ManagerResponse
{

    private List result;
	private boolean error;

	public CommandResponse(org.asteriskjava.manager.response.ManagerResponse response)
    {
        super(response);

        if (response instanceof org.asteriskjava.manager.response.CommandResponse) {
	        result = ((org.asteriskjava.manager.response.CommandResponse) response).getResult();
        } else if (response instanceof org.asteriskjava.manager.response.ManagerError) {
        	error = true;
        	result = Collections.singletonList(response.getOutput());
        }
    }

    public List getResult()
    {
        return this.result;
    }

	public boolean isError()
	{
		return error;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy