package org.glassfish.grizzly.http;
import org.glassfish.grizzly.filterchain.FilterChainEvent;
public class HttpEvents {
public static IncomingHttpUpgradeEvent (final HttpHeader httpHeader) {
return new IncomingHttpUpgradeEvent(httpHeader);
}
public static OutgoingHttpUpgradeEvent (final HttpHeader httpHeader) {
return new OutgoingHttpUpgradeEvent(httpHeader);
}
public static ChangePacketInProgressEvent (final HttpHeader packet) {
return new ChangePacketInProgressEvent(packet);
}
public static final class ChangePacketInProgressEvent implements FilterChainEvent {
public static final Object TYPE = ChangePacketInProgressEvent.class.getName();
private final HttpHeader ;
private (HttpHeader httpHeader) {
this.httpHeader = httpHeader;
}
public HttpHeader getPacket() {
return httpHeader;
}
@Override
public Object type() {
return TYPE;
}
}
public static final class ResponseCompleteEvent implements FilterChainEvent {
public static final Object TYPE = ResponseCompleteEvent.class.getName();
@Override
public Object type() {
return TYPE;
}
}
public static final class IncomingHttpUpgradeEvent extends HttpUpgradeEvent {
public static final Object TYPE = IncomingHttpUpgradeEvent.class.getName();
private (final HttpHeader httpHeader) {
super(httpHeader);
}
@Override
public Object type() {
return TYPE;
}
}
public static final class OutgoingHttpUpgradeEvent extends HttpUpgradeEvent {
public static final Object TYPE = OutgoingHttpUpgradeEvent.class.getName();
private (final HttpHeader httpHeader) {
super(httpHeader);
}
@Override
public Object type() {
return TYPE;
}
}
private static abstract class HttpUpgradeEvent implements FilterChainEvent {
private final HttpHeader ;
private (final HttpHeader httpHeader) {
this.httpHeader = httpHeader;
}
public HttpHeader () {
return httpHeader;
}
}
}