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

thrift.test.original.TestInterface Maven / Gradle / Ivy

The newest version!
package thrift.test.original;

import java.net.URI;
import java.net.URL;
import java.nio.ByteBuffer;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * just for testing only
 * @author guyadong
 *
 */
public interface TestInterface {
	public TestBeanA testBean(TestBeanB input);
	public float test(String strInput,int intInput,Date dateInput,byte[] binaryInput, Long longInput);
	public byte[] byteTest(byte[] input) throws TestException;
	public List testList(Map input);
	public List testArray(long[] input);
	public URL[] testUR(URI input);
	public static class TestBeanA{
		private byte[] byteArray;
		private int[] intArray;
		private Map values;
		private List longList;
		private List urls;
		private Float rate;
		public byte[] getByteArray() {
			return byteArray;
		}
		public void setByteArray(byte[] byteArray) {
			this.byteArray = byteArray;
		}
		public int[] getIntArray() {
			return intArray;
		}
		public void setIntArray(int[] intArray) {
			this.intArray = intArray;
		}
		public Map getValues() {
			return values;
		}
		public void setValues(Map values) {
			this.values = values;
		}
		public List getLongList() {
			return longList;
		}
		public void setLongList(List longList) {
			this.longList = longList;
		}
		public List getUrls() {
			return urls;
		}
		public void setUrls(List urls) {
			this.urls = urls;
		}
		public Float getRate() {
			return rate;
		}
		public void setRate(Float rate) {
			this.rate = rate;
		}
	}
	public static final class TestBeanB{
		private ByteBuffer buffer;
		private List intArray;
		private Map values;
		private Set doubleList;
		public ByteBuffer getBuffer() {
			return buffer;
		}
		public void setBuffer(ByteBuffer buffer) {
			this.buffer = buffer;
		}
		public List getIntArray() {
			return intArray;
		}
		public void setIntArray(List intArray) {
			this.intArray = intArray;
		}
		public Map getValues() {
			return values;
		}
		public void setValues(Map values) {
			this.values = values;
		}
		public Set getDoubleList() {
			return doubleList;
		}
		public void setDoubleList(Set doubleList) {
			this.doubleList = doubleList;
		}
	}
	public static class TestException extends Exception{
		private static final long serialVersionUID = 1L;

		public TestException() {
			super();
		}

		public TestException(String arg0, Throwable arg1) {
			super(arg0, arg1);
		}

		public TestException(String arg0) {
			super(arg0);
		}

		public TestException(Throwable arg0) {
			super(arg0);
		}
		
	}
	public static class BaseImpl implements TestInterface{

		@Override
		public float test(String strInput, int intInput, Date dateInput, byte[] binaryInput, Long longInput) {
			return 0;
		}

		@Override
		public byte[] byteTest(byte[] input) throws TestException{
			return null;
		}

		@Override
		public List testList(Map input) {
			return null;
		}

		@Override
		public List testArray(long[] input) {
			return null;
		}

		@Override
		public URL[] testUR(URI input) {
			return null;
		}

		@Override
		public TestBeanA testBean(TestBeanB input) {
			return null;
		}
		
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy