com.github.dreamhead.moco.model.DefaultHttpMessage Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of moco-core Show documentation
Show all versions of moco-core Show documentation
Moco is an easy setup stub framework, mainly focusing on testing and integration.
package com.github.dreamhead.moco.model;
import com.github.dreamhead.moco.HttpMessage;
import com.github.dreamhead.moco.HttpProtocolVersion;
import com.google.common.collect.ImmutableMap;
public abstract class DefaultHttpMessage implements HttpMessage {
private final HttpProtocolVersion version;
private final MessageContent content;
private final ImmutableMap headers;
protected DefaultHttpMessage(final HttpProtocolVersion version, final MessageContent content,
final ImmutableMap headers) {
this.version = version;
this.content = content;
this.headers = headers;
}
@Override
public HttpProtocolVersion getVersion() {
return this.version;
}
@Override
public ImmutableMap getHeaders() {
return this.headers;
}
@Override
public MessageContent getContent() {
return this.content;
}
}