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

com.github.brainlag.nsq.frames.NSQFrame Maven / Gradle / Ivy

The newest version!
package com.github.brainlag.nsq.frames;

public abstract class NSQFrame {

	private int size;
	private byte[] data;
	
	
	public static NSQFrame instance(int type) {
		switch (type) {
		case 0 :
			return new ResponseFrame();
		case 1 : 
			return new ErrorFrame();
		case 2 :
			return new MessageFrame();
		}
		return null;
	}
	
	
	public int getSize() {
		return size;
	}
	public void setSize(int size) {
		this.size = size;
	}
	public byte[] getData() {
		return data;
	}
	public void setData(byte[] data) {
		this.data = data;
	}
	
	
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy