geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1612628 [2/4] - in /geronimo/specs/trunk/geronimo-jaxrs_2.0_spec: ./ src/ src/main/ src/main/java/ src/main/java/javax/ src/main/java/javax/ws/ src/main/java/javax/ws/rs/ src/main/java/javax/ws/rs/client/ src/main/java/javax/ws/rs/containe...
Date Tue, 22 Jul 2014 17:50:27 GMT
Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/PathParam.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/PathParam.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/PathParam.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/PathParam.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,37 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * #L%
+ */
+
+package javax.ws.rs;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+
+@Target({ElementType.PARAMETER, ElementType.METHOD, ElementType.FIELD})
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface PathParam {
+
+
+    String value();
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/Priorities.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/Priorities.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/Priorities.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/Priorities.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,40 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * #L%
+ */
+
+package javax.ws.rs;
+
+
+public final class Priorities {
+
+    private Priorities() {
+
+    }
+
+
+    public static final int AUTHENTICATION = 1000;
+
+    public static final int AUTHORIZATION = 2000;
+
+    public static final int HEADER_DECORATOR = 3000;
+
+    public static final int ENTITY_CODER = 4000;
+
+    public static final int USER = 5000;
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/ProcessingException.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/ProcessingException.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/ProcessingException.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/ProcessingException.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,42 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * #L%
+ */
+
+package javax.ws.rs;
+
+
+public class ProcessingException extends RuntimeException {
+
+    private static final long serialVersionUID = -4232431597816056514L;
+
+
+    public ProcessingException(final Throwable cause) {
+        super(cause);
+    }
+
+
+    public ProcessingException(final String message, final Throwable cause) {
+        super(message, cause);
+    }
+
+
+    public ProcessingException(final String message) {
+        super(message);
+    }
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/Produces.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/Produces.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/Produces.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/Produces.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,39 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * #L%
+ */
+
+package javax.ws.rs;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+
+@Inherited
+@Target({ElementType.TYPE, ElementType.METHOD})
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface Produces {
+
+
+    String[] value() default "*/*";
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/QueryParam.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/QueryParam.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/QueryParam.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/QueryParam.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,37 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * #L%
+ */
+
+package javax.ws.rs;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+
+@Target({ElementType.PARAMETER, ElementType.METHOD, ElementType.FIELD})
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface QueryParam {
+
+
+    String value();
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/RedirectionException.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/RedirectionException.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/RedirectionException.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/RedirectionException.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,65 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * #L%
+ */
+
+package javax.ws.rs;
+
+import javax.ws.rs.core.Response;
+import java.net.URI;
+
+
+public class RedirectionException extends WebApplicationException {
+
+    private static final long serialVersionUID = -2584325408291098012L;
+
+
+    public RedirectionException(Response.Status status, URI location) {
+        super((Throwable) null, validate(Response.status(status).location(location).build(), Response.Status.Family.REDIRECTION));
+    }
+
+
+    public RedirectionException(String message, Response.Status status, URI location) {
+        super(message, null, validate(Response.status(status).location(location).build(), Response.Status.Family.REDIRECTION));
+    }
+
+
+    public RedirectionException(int status, URI location) {
+        super((Throwable) null, validate(Response.status(status).location(location).build(), Response.Status.Family.REDIRECTION));
+    }
+
+
+    public RedirectionException(String message, int status, URI location) {
+        super(message, null, validate(Response.status(status).location(location).build(), Response.Status.Family.REDIRECTION));
+    }
+
+
+    public RedirectionException(Response response) {
+        super((Throwable) null, validate(response, Response.Status.Family.REDIRECTION));
+    }
+
+
+    public RedirectionException(String message, Response response) {
+        super(message, null, validate(response, Response.Status.Family.REDIRECTION));
+    }
+
+
+    public URI getLocation() {
+        return getResponse().getLocation();
+    }
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/RuntimeType.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/RuntimeType.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/RuntimeType.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/RuntimeType.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,29 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * #L%
+ */
+
+package javax.ws.rs;
+
+
+public enum RuntimeType {
+
+    CLIENT,
+
+    SERVER
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/ServerErrorException.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/ServerErrorException.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/ServerErrorException.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/ServerErrorException.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,89 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * #L%
+ */
+
+package javax.ws.rs;
+
+import javax.ws.rs.core.Response;
+
+
+public class ServerErrorException extends WebApplicationException {
+
+    private static final long serialVersionUID = 4730895276505569556L;
+
+
+    public ServerErrorException(Response.Status status) {
+        super((Throwable) null, validate(Response.status(status).build(), Response.Status.Family.SERVER_ERROR));
+    }
+
+
+    public ServerErrorException(String message, Response.Status status) {
+        super(message, null, validate(Response.status(status).build(), Response.Status.Family.SERVER_ERROR));
+    }
+
+
+    public ServerErrorException(int status) {
+        super((Throwable) null, validate(Response.status(status).build(), Response.Status.Family.SERVER_ERROR));
+    }
+
+
+    public ServerErrorException(String message, int status) {
+        super(message, null, validate(Response.status(status).build(), Response.Status.Family.SERVER_ERROR));
+    }
+
+
+    public ServerErrorException(Response response) {
+        super((Throwable) null, validate(response, Response.Status.Family.SERVER_ERROR));
+    }
+
+
+    public ServerErrorException(String message, Response response) {
+        super(message, null, validate(response, Response.Status.Family.SERVER_ERROR));
+    }
+
+
+    public ServerErrorException(Response.Status status, Throwable cause) {
+        super(cause, validate(Response.status(status).build(), Response.Status.Family.SERVER_ERROR));
+    }
+
+
+    public ServerErrorException(String message, Response.Status status, Throwable cause) {
+        super(message, cause, validate(Response.status(status).build(), Response.Status.Family.SERVER_ERROR));
+    }
+
+
+    public ServerErrorException(int status, Throwable cause) {
+        super(cause, validate(Response.status(status).build(), Response.Status.Family.SERVER_ERROR));
+    }
+
+
+    public ServerErrorException(String message, int status, Throwable cause) {
+        super(message, cause, validate(Response.status(status).build(), Response.Status.Family.SERVER_ERROR));
+    }
+
+
+    public ServerErrorException(Response response, Throwable cause) {
+        super(cause, validate(response, Response.Status.Family.SERVER_ERROR));
+    }
+
+
+    public ServerErrorException(String message, Response response, Throwable cause) {
+        super(message, cause, validate(response, Response.Status.Family.SERVER_ERROR));
+    }
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/ServiceUnavailableException.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/ServiceUnavailableException.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/ServiceUnavailableException.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/ServiceUnavailableException.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,127 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * #L%
+ */
+
+package javax.ws.rs;
+
+import javax.ws.rs.core.Response;
+import javax.ws.rs.ext.RuntimeDelegate;
+import java.util.Date;
+
+import static javax.ws.rs.core.HttpHeaders.RETRY_AFTER;
+import static javax.ws.rs.core.Response.Status.SERVICE_UNAVAILABLE;
+
+
+public class ServiceUnavailableException extends ServerErrorException {
+
+    private static final long serialVersionUID = 3821068205617492633L;
+
+
+    public ServiceUnavailableException() {
+        super(Response.status(SERVICE_UNAVAILABLE).build());
+    }
+
+
+    public ServiceUnavailableException(String message) {
+        super(message, Response.status(SERVICE_UNAVAILABLE).build());
+    }
+
+
+    public ServiceUnavailableException(Long retryAfter) {
+        super(Response.status(SERVICE_UNAVAILABLE).header(RETRY_AFTER, retryAfter).build());
+    }
+
+
+    public ServiceUnavailableException(String message, Long retryAfter) {
+        super(message, Response.status(SERVICE_UNAVAILABLE).header(RETRY_AFTER, retryAfter).build());
+    }
+
+
+    public ServiceUnavailableException(Date retryAfter) {
+        super(Response.status(SERVICE_UNAVAILABLE).header(RETRY_AFTER, retryAfter).build());
+    }
+
+
+    public ServiceUnavailableException(String message, Date retryAfter) {
+        super(message, Response.status(SERVICE_UNAVAILABLE).header(RETRY_AFTER, retryAfter).build());
+    }
+
+
+    public ServiceUnavailableException(Response response) {
+        super(validate(response, SERVICE_UNAVAILABLE));
+    }
+
+
+    public ServiceUnavailableException(String message, Response response) {
+        super(message, validate(response, SERVICE_UNAVAILABLE));
+    }
+
+
+    public ServiceUnavailableException(Date retryAfter, Throwable cause) {
+        super(Response.status(SERVICE_UNAVAILABLE).header(RETRY_AFTER, retryAfter).build(), cause);
+    }
+
+
+    public ServiceUnavailableException(String message, Date retryAfter, Throwable cause) {
+        super(message, Response.status(SERVICE_UNAVAILABLE).header(RETRY_AFTER, retryAfter).build(), cause);
+    }
+
+
+    public ServiceUnavailableException(Long retryAfter, Throwable cause) {
+        super(Response.status(SERVICE_UNAVAILABLE).header(RETRY_AFTER, retryAfter).build(), cause);
+    }
+
+
+    public ServiceUnavailableException(String message, Long retryAfter, Throwable cause) {
+        super(message, Response.status(SERVICE_UNAVAILABLE).header(RETRY_AFTER, retryAfter).build(), cause);
+    }
+
+
+    public ServiceUnavailableException(Response response, Throwable cause) {
+        super(validate(response, SERVICE_UNAVAILABLE), cause);
+    }
+
+
+    public ServiceUnavailableException(String message, Response response, Throwable cause) {
+        super(message, validate(response, SERVICE_UNAVAILABLE), cause);
+    }
+
+
+    public boolean hasRetryAfter() {
+        return getResponse().getHeaders().containsKey(RETRY_AFTER);
+    }
+
+
+    public Date getRetryTime(final Date requestTime) {
+        final String value = getResponse().getHeaderString(RETRY_AFTER);
+        if (value == null) {
+            return null;
+        }
+
+        try {
+            Long interval = Long.parseLong(value);
+            return new Date(requestTime.getTime() + interval * 1000);
+        } catch (NumberFormatException ex) {
+
+        }
+
+        final RuntimeDelegate.HeaderDelegate<Date> dateDelegate = RuntimeDelegate.getInstance().createHeaderDelegate(Date.class);
+        return dateDelegate.fromString(value);
+    }
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/WebApplicationException.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/WebApplicationException.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/WebApplicationException.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/WebApplicationException.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,146 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * #L%
+ */
+
+package javax.ws.rs;
+
+import javax.ws.rs.core.Response;
+
+
+public class WebApplicationException extends RuntimeException {
+
+    private static final long serialVersionUID = 8273970399584007146L;
+    private final Response response;
+
+
+    public WebApplicationException() {
+        this((Throwable) null, Response.Status.INTERNAL_SERVER_ERROR);
+    }
+
+
+    public WebApplicationException(String message) {
+        this(message, null, Response.Status.INTERNAL_SERVER_ERROR);
+    }
+
+
+    public WebApplicationException(final Response response) {
+        this((Throwable) null, response);
+    }
+
+
+    public WebApplicationException(final String message, final Response response) {
+        this(message, null, response);
+    }
+
+
+    public WebApplicationException(final int status) {
+        this((Throwable) null, status);
+    }
+
+
+    public WebApplicationException(final String message, final int status) {
+        this(message, null, status);
+    }
+
+
+    public WebApplicationException(final Response.Status status) {
+        this((Throwable) null, status);
+    }
+
+
+    public WebApplicationException(final String message, final Response.Status status) {
+        this(message, null, status);
+    }
+
+
+    public WebApplicationException(final Throwable cause) {
+        this(cause, Response.Status.INTERNAL_SERVER_ERROR);
+    }
+
+
+    public WebApplicationException(final String message, final Throwable cause) {
+        this(message, cause, Response.Status.INTERNAL_SERVER_ERROR);
+    }
+
+
+    public WebApplicationException(final Throwable cause, final Response response) {
+        this(computeExceptionMessage(response), cause, response);
+    }
+
+
+    public WebApplicationException(final String message, final Throwable cause, final Response response) {
+        super(message, cause);
+        if (response == null) {
+            this.response = Response.serverError().build();
+        } else {
+            this.response = response;
+        }
+    }
+
+    private static String computeExceptionMessage(Response response) {
+        final Response.StatusType statusInfo;
+        if (response != null) {
+            statusInfo = response.getStatusInfo();
+        } else {
+            statusInfo = Response.Status.INTERNAL_SERVER_ERROR;
+        }
+        return "HTTP " + statusInfo.getStatusCode() + ' ' + statusInfo.getReasonPhrase();
+    }
+
+
+    public WebApplicationException(final Throwable cause, final int status) {
+        this(cause, Response.status(status).build());
+    }
+
+
+    public WebApplicationException(final String message, final Throwable cause, final int status) {
+        this(message, cause, Response.status(status).build());
+    }
+
+
+    public WebApplicationException(final Throwable cause, final Response.Status status) throws IllegalArgumentException {
+        this(cause, Response.status(status).build());
+    }
+
+
+    public WebApplicationException(final String message, final Throwable cause, final Response.Status status) throws IllegalArgumentException {
+        this(message, cause, Response.status(status).build());
+    }
+
+
+    public Response getResponse() {
+        return response;
+    }
+
+
+    static Response validate(final Response response, Response.Status expectedStatus) {
+        if (expectedStatus.getStatusCode() != response.getStatus()) {
+            throw new IllegalArgumentException(String.format("Invalid response status code. Expected [%d], was [%d].", expectedStatus.getStatusCode(), response.getStatus()));
+        }
+        return response;
+    }
+
+
+    static Response validate(final Response response, Response.Status.Family expectedStatusFamily) {
+        if (response.getStatusInfo().getFamily() != expectedStatusFamily) {
+            throw new IllegalArgumentException(String.format("Status code of the supplied response [%d] is not from the required status code family \"%s\".", response.getStatus(), expectedStatusFamily));
+        }
+        return response;
+    }
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/AsyncInvoker.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/AsyncInvoker.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/AsyncInvoker.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/AsyncInvoker.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,131 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * #L%
+ */
+
+package javax.ws.rs.client;
+
+import javax.ws.rs.core.GenericType;
+import javax.ws.rs.core.Response;
+import java.util.concurrent.Future;
+
+
+public interface AsyncInvoker {
+
+
+    Future<Response> get();
+
+
+    <T> Future<T> get(Class<T> responseType);
+
+
+    <T> Future<T> get(GenericType<T> responseType);
+
+
+    <T> Future<T> get(InvocationCallback<T> callback);
+
+
+    Future<Response> put(Entity<?> entity);
+
+
+    <T> Future<T> put(Entity<?> entity, Class<T> responseType);
+
+
+    <T> Future<T> put(Entity<?> entity, GenericType<T> responseType);
+
+
+    <T> Future<T> put(Entity<?> entity, InvocationCallback<T> callback);
+
+
+    Future<Response> post(Entity<?> entity);
+
+
+    <T> Future<T> post(Entity<?> entity, Class<T> responseType);
+
+
+    <T> Future<T> post(Entity<?> entity, GenericType<T> responseType);
+
+
+    <T> Future<T> post(Entity<?> entity, InvocationCallback<T> callback);
+
+
+    Future<Response> delete();
+
+
+    <T> Future<T> delete(Class<T> responseType);
+
+
+    <T> Future<T> delete(GenericType<T> responseType);
+
+
+    <T> Future<T> delete(InvocationCallback<T> callback);
+
+
+    Future<Response> head();
+
+
+    Future<Response> head(InvocationCallback<Response> callback);
+
+
+    Future<Response> options();
+
+
+    <T> Future<T> options(Class<T> responseType);
+
+
+    <T> Future<T> options(GenericType<T> responseType);
+
+
+    <T> Future<T> options(InvocationCallback<T> callback);
+
+
+    Future<Response> trace();
+
+
+    <T> Future<T> trace(Class<T> responseType);
+
+
+    <T> Future<T> trace(GenericType<T> responseType);
+
+
+    <T> Future<T> trace(InvocationCallback<T> callback);
+
+
+    Future<Response> method(String name);
+
+
+    <T> Future<T> method(String name, Class<T> responseType);
+
+
+    <T> Future<T> method(String name, GenericType<T> responseType);
+
+
+    <T> Future<T> method(String name, InvocationCallback<T> callback);
+
+
+    Future<Response> method(String name, Entity<?> entity);
+
+
+    <T> Future<T> method(String name, Entity<?> entity, Class<T> responseType);
+
+
+    <T> Future<T> method(String name, Entity<?> entity, GenericType<T> responseType);
+
+
+    <T> Future<T> method(String name, Entity<?> entity, InvocationCallback<T> callback);
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/Client.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/Client.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/Client.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/Client.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,56 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * #L%
+ */
+
+package javax.ws.rs.client;
+
+import javax.net.ssl.HostnameVerifier;
+import javax.net.ssl.SSLContext;
+import javax.ws.rs.core.Configurable;
+import javax.ws.rs.core.Link;
+import javax.ws.rs.core.UriBuilder;
+import java.net.URI;
+
+
+public interface Client extends Configurable<Client> {
+
+
+    void close();
+
+
+    WebTarget target(String uri);
+
+
+    WebTarget target(URI uri);
+
+
+    WebTarget target(UriBuilder uriBuilder);
+
+
+    WebTarget target(Link link);
+
+
+    Invocation.Builder invocation(Link link);
+
+
+    SSLContext getSslContext();
+
+
+    HostnameVerifier getHostnameVerifier();
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/ClientBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/ClientBuilder.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/ClientBuilder.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/ClientBuilder.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,82 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * #L%
+ */
+
+package javax.ws.rs.client;
+
+import javax.net.ssl.HostnameVerifier;
+import javax.net.ssl.SSLContext;
+import javax.ws.rs.core.Configurable;
+import javax.ws.rs.core.Configuration;
+import java.security.KeyStore;
+
+
+public abstract class ClientBuilder implements Configurable<ClientBuilder> {
+    public static final String JAXRS_DEFAULT_CLIENT_BUILDER_PROPERTY = "javax.ws.rs.client.ClientBuilder";
+
+    protected ClientBuilder() {
+        // no-op
+    }
+
+
+    public static ClientBuilder newBuilder() {
+        try {
+            final Object delegate = ClientFinder.find(JAXRS_DEFAULT_CLIENT_BUILDER_PROPERTY);
+            if (!ClientBuilder.class.isInstance(delegate)) {
+                throw new LinkageError(delegate + " not an instance of ClientBuilder");
+            }
+            return ClientBuilder.class.cast(delegate);
+        } catch (Exception ex) {
+            throw new RuntimeException(ex);
+        }
+    }
+
+
+    public static Client newClient() {
+        return newBuilder().build();
+    }
+
+
+    public static Client newClient(final Configuration configuration) {
+        return newBuilder().withConfig(configuration).build();
+    }
+
+
+    public abstract ClientBuilder withConfig(Configuration config);
+
+
+    public abstract ClientBuilder sslContext(final SSLContext sslContext);
+
+
+    public abstract ClientBuilder keyStore(final KeyStore keyStore, final char[] password);
+
+
+    public ClientBuilder keyStore(final KeyStore keyStore, final String password) {
+        return keyStore(keyStore, password.toCharArray());
+    }
+
+
+    public abstract ClientBuilder trustStore(final KeyStore trustStore);
+
+
+    public abstract ClientBuilder hostnameVerifier(final HostnameVerifier verifier);
+
+
+    public abstract Client build();
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/ClientFinder.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/ClientFinder.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/ClientFinder.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/ClientFinder.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,123 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * #L%
+ */
+
+package javax.ws.rs.client;
+
+import org.apache.geronimo.osgi.locator.ProviderLocator;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.Properties;
+import java.util.logging.Logger;
+
+// pretty much the RI logic to go in java home too
+final class ClientFinder {
+    private static final Logger LOGGER = Logger.getLogger(ClientFinder.class.getName());
+    private static final String FACTORY_ID = ClientBuilder.class.getName();
+    private static final String SERVICE_ID = "META-INF/services/" + FACTORY_ID;
+
+    static Object find(final String defaultClazz) throws ClassNotFoundException {
+        final ClassLoader classLoader = getContextClassLoader();
+
+        try {
+            final Object delegate = ProviderLocator.getService(FACTORY_ID, ClientBuilder.class, classLoader);
+            if (delegate != null) {
+                return delegate;
+            }
+
+            InputStream is;
+            if (classLoader == null) {
+                is = ClassLoader.getSystemResourceAsStream(SERVICE_ID);
+            } else {
+                is = classLoader.getResourceAsStream(SERVICE_ID);
+            }
+
+            if (is != null) {
+                final BufferedReader rd = new BufferedReader(new InputStreamReader(is, "UTF-8"));
+                final String factoryClassName = rd.readLine();
+                rd.close();
+                if (factoryClassName != null && !"".equals(factoryClassName)) {
+                    return newInstance(factoryClassName, classLoader);
+                }
+            }
+        } catch (final Exception ex) {
+            LOGGER.finest(ex.getMessage());
+        }
+
+        try {
+            final File f = new File(System.getProperty("java.home") + File.separator + "lib" + File.separator + "jaxrs.properties");
+            if (f.exists()) {
+                final Properties props = new Properties();
+                props.load(new FileInputStream(f));
+                final String factoryClassName = props.getProperty(FACTORY_ID);
+                return newInstance(factoryClassName, classLoader);
+            }
+        } catch (final Exception ex) {
+            LOGGER.finest(ex.getMessage());
+        }
+
+        try {
+            final String systemProp = System.getProperty(FACTORY_ID);
+            if (systemProp != null) {
+                return newInstance(systemProp, classLoader);
+            }
+        } catch (final SecurityException se) {
+            LOGGER.finest(se.getMessage());
+        }
+
+        if (defaultClazz == null) {
+            throw new ClassNotFoundException(FACTORY_ID + " not found", null);
+        }
+
+        return newInstance(defaultClazz, classLoader);
+    }
+
+    static ClassLoader getContextClassLoader() {
+        return Thread.currentThread().getContextClassLoader();
+    }
+
+    private static Object newInstance(final String className, final ClassLoader classLoader) throws ClassNotFoundException {
+        try {
+            Class spiClass;
+            if (classLoader == null) {
+                spiClass = Class.forName(className);
+            } else {
+                try {
+                    spiClass = Class.forName(className, false, classLoader);
+                } catch (final ClassNotFoundException ex) {
+                    LOGGER.finest(ex.getMessage());
+                    spiClass = Class.forName(className);
+                }
+            }
+            return spiClass.newInstance();
+        } catch (final ClassNotFoundException x) {
+            throw x;
+        } catch (final Exception x) {
+            throw new ClassNotFoundException(x.getMessage(), x);
+        }
+    }
+
+    private ClientFinder() {
+        // no-op
+    }
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/ClientRequestContext.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/ClientRequestContext.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/ClientRequestContext.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/ClientRequestContext.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,127 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * #L%
+ */
+
+package javax.ws.rs.client;
+
+import javax.ws.rs.core.Configuration;
+import javax.ws.rs.core.Cookie;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.MultivaluedMap;
+import javax.ws.rs.core.Response;
+import java.io.OutputStream;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
+import java.net.URI;
+import java.util.Collection;
+import java.util.Date;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+
+
+public interface ClientRequestContext {
+
+
+    Object getProperty(String name);
+
+
+    Collection<String> getPropertyNames();
+
+
+    void setProperty(String name, Object object);
+
+
+    void removeProperty(String name);
+
+
+    URI getUri();
+
+
+    void setUri(URI uri);
+
+
+    String getMethod();
+
+
+    void setMethod(String method);
+
+
+    MultivaluedMap<String, Object> getHeaders();
+
+
+    abstract MultivaluedMap<String, String> getStringHeaders();
+
+
+    String getHeaderString(String name);
+
+
+    Date getDate();
+
+
+    Locale getLanguage();
+
+
+    MediaType getMediaType();
+
+
+    List<MediaType> getAcceptableMediaTypes();
+
+
+    List<Locale> getAcceptableLanguages();
+
+
+    Map<String, Cookie> getCookies();
+
+
+    boolean hasEntity();
+
+
+    Object getEntity();
+
+
+    Class<?> getEntityClass();
+
+
+    Type getEntityType();
+
+
+    void setEntity(final Object entity);
+
+
+    void setEntity(final Object entity, final Annotation[] annotations, final MediaType mediaType);
+
+
+    Annotation[] getEntityAnnotations();
+
+
+    OutputStream getEntityStream();
+
+
+    void setEntityStream(OutputStream outputStream);
+
+
+    Client getClient();
+
+
+    Configuration getConfiguration();
+
+
+    void abortWith(Response response);
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/ClientRequestFilter.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/ClientRequestFilter.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/ClientRequestFilter.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/ClientRequestFilter.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,30 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * #L%
+ */
+
+package javax.ws.rs.client;
+
+import java.io.IOException;
+
+
+public interface ClientRequestFilter {
+
+
+    void filter(ClientRequestContext requestContext) throws IOException;
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/ClientResponseContext.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/ClientResponseContext.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/ClientResponseContext.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/ClientResponseContext.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,104 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * #L%
+ */
+
+package javax.ws.rs.client;
+
+import javax.ws.rs.core.EntityTag;
+import javax.ws.rs.core.Link;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.MultivaluedMap;
+import javax.ws.rs.core.NewCookie;
+import javax.ws.rs.core.Response;
+import java.io.InputStream;
+import java.net.URI;
+import java.util.Date;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
+
+
+public interface ClientResponseContext {
+
+
+    public int getStatus();
+
+
+    public void setStatus(int code);
+
+
+    public Response.StatusType getStatusInfo();
+
+
+    public void setStatusInfo(Response.StatusType statusInfo);
+
+
+    public MultivaluedMap<String, String> getHeaders();
+
+
+    public String getHeaderString(String name);
+
+
+    public Set<String> getAllowedMethods();
+
+
+    public Date getDate();
+
+
+    public Locale getLanguage();
+
+
+    public int getLength();
+
+
+    public MediaType getMediaType();
+
+
+    public Map<String, NewCookie> getCookies();
+
+
+    public EntityTag getEntityTag();
+
+
+    public Date getLastModified();
+
+
+    public URI getLocation();
+
+
+    public Set<Link> getLinks();
+
+
+    boolean hasLink(String relation);
+
+
+    public Link getLink(String relation);
+
+
+    public Link.Builder getLinkBuilder(String relation);
+
+
+    public boolean hasEntity();
+
+
+    public InputStream getEntityStream();
+
+
+    public void setEntityStream(InputStream input);
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/ClientResponseFilter.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/ClientResponseFilter.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/ClientResponseFilter.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/ClientResponseFilter.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,30 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * #L%
+ */
+
+package javax.ws.rs.client;
+
+import java.io.IOException;
+
+
+public interface ClientResponseFilter {
+
+
+    void filter(ClientRequestContext requestContext, ClientResponseContext responseContext) throws IOException;
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/Entity.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/Entity.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/Entity.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/Entity.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,145 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * #L%
+ */
+
+package javax.ws.rs.client;
+
+import javax.ws.rs.core.Form;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.MultivaluedMap;
+import javax.ws.rs.core.Variant;
+import java.lang.annotation.Annotation;
+import java.util.Locale;
+
+
+public final class Entity<T> {
+    private static final Annotation[] EMPTY_ANNOTATIONS = new Annotation[0];
+
+    private final T entity;
+    private final Variant variant;
+    private final Annotation[] annotations;
+
+
+    public static <T> Entity<T> entity(final T entity, final MediaType mediaType) {
+        return new Entity<T>(entity, mediaType);
+    }
+
+
+    public static <T> Entity<T> entity(final T entity, final MediaType mediaType, Annotation[] annotations) {
+        return new Entity<T>(entity, mediaType, annotations);
+    }
+
+
+    public static <T> Entity<T> entity(final T entity, final String mediaType) {
+        return new Entity<T>(entity, MediaType.valueOf(mediaType));
+    }
+
+
+    public static <T> Entity<T> entity(final T entity, final Variant variant) {
+        return new Entity<T>(entity, variant);
+    }
+
+
+    public static <T> Entity<T> entity(final T entity, final Variant variant, Annotation[] annotations) {
+        return new Entity<T>(entity, variant, annotations);
+    }
+
+
+    public static <T> Entity<T> text(final T entity) {
+        return new Entity<T>(entity, MediaType.TEXT_PLAIN_TYPE);
+    }
+
+
+    public static <T> Entity<T> xml(final T entity) {
+        return new Entity<T>(entity, MediaType.APPLICATION_XML_TYPE);
+    }
+
+
+    public static <T> Entity<T> json(final T entity) {
+        return new Entity<T>(entity, MediaType.APPLICATION_JSON_TYPE);
+    }
+
+
+    public static <T> Entity<T> html(final T entity) {
+        return new Entity<T>(entity, MediaType.TEXT_HTML_TYPE);
+    }
+
+
+    public static <T> Entity<T> xhtml(final T entity) {
+        return new Entity<T>(entity, MediaType.APPLICATION_XHTML_XML_TYPE);
+    }
+
+
+    public static Entity<Form> form(final Form form) {
+        return new Entity<Form>(form, MediaType.APPLICATION_FORM_URLENCODED_TYPE);
+    }
+
+
+    public static Entity<Form> form(final MultivaluedMap<String, String> formData) {
+        return new Entity<Form>(new Form(formData), MediaType.APPLICATION_FORM_URLENCODED_TYPE);
+    }
+
+    private Entity(final T entity, final MediaType mediaType) {
+        this(entity, new Variant(mediaType, (Locale) null, null), EMPTY_ANNOTATIONS);
+    }
+
+    private Entity(final T entity, final Variant variant) {
+        this(entity, variant, EMPTY_ANNOTATIONS);
+    }
+
+    private Entity(final T entity, final MediaType mediaType, Annotation[] annotations) {
+        this(entity, new Variant(mediaType, (Locale) null, null), annotations);
+    }
+
+    private Entity(final T entity, final Variant variant, Annotation[] annotations) {
+        this.entity = entity;
+        this.variant = variant;
+        this.annotations = annotations;
+    }
+
+
+    public Variant getVariant() {
+        return variant;
+    }
+
+
+    public MediaType getMediaType() {
+        return variant.getMediaType();
+    }
+
+
+    public String getEncoding() {
+        return variant.getEncoding();
+    }
+
+
+    public Locale getLanguage() {
+        return variant.getLanguage();
+    }
+
+
+    public T getEntity() {
+        return entity;
+    }
+
+
+    public Annotation[] getAnnotations() {
+        return annotations;
+    }
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/Invocation.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/Invocation.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/Invocation.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/Invocation.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,116 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * #L%
+ */
+
+package javax.ws.rs.client;
+
+import javax.ws.rs.core.CacheControl;
+import javax.ws.rs.core.Cookie;
+import javax.ws.rs.core.GenericType;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.MultivaluedMap;
+import javax.ws.rs.core.Response;
+import java.util.Locale;
+import java.util.concurrent.Future;
+
+
+public interface Invocation {
+
+
+    static interface Builder extends SyncInvoker {
+
+
+        Invocation build(String method);
+
+
+        Invocation build(String method, Entity<?> entity);
+
+
+        Invocation buildGet();
+
+
+        Invocation buildDelete();
+
+
+        Invocation buildPost(Entity<?> entity);
+
+
+        Invocation buildPut(Entity<?> entity);
+
+
+        AsyncInvoker async();
+
+
+        Builder accept(String... mediaTypes);
+
+
+        Builder accept(MediaType... mediaTypes);
+
+
+        Builder acceptLanguage(Locale... locales);
+
+
+        Builder acceptLanguage(String... locales);
+
+
+        Builder acceptEncoding(String... encodings);
+
+
+        Builder cookie(Cookie cookie);
+
+
+        Builder cookie(String name, String value);
+
+
+        Builder cacheControl(CacheControl cacheControl);
+
+
+        Builder header(String name, Object value);
+
+
+        Builder headers(MultivaluedMap<String, Object> headers);
+
+
+        Builder property(String name, Object value);
+    }
+
+
+    Invocation property(String name, Object value);
+
+
+    Response invoke();
+
+
+    <T> T invoke(Class<T> responseType);
+
+
+    <T> T invoke(GenericType<T> responseType);
+
+
+    Future<Response> submit();
+
+
+    <T> Future<T> submit(Class<T> responseType);
+
+
+    <T> Future<T> submit(GenericType<T> responseType);
+
+
+    <T> Future<T> submit(InvocationCallback<T> callback);
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/InvocationCallback.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/InvocationCallback.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/InvocationCallback.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/InvocationCallback.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,31 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * #L%
+ */
+
+package javax.ws.rs.client;
+
+
+public interface InvocationCallback<RESPONSE> {
+
+
+    public void completed(RESPONSE response);
+
+
+    public void failed(Throwable throwable);
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/ResponseProcessingException.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/ResponseProcessingException.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/ResponseProcessingException.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/ResponseProcessingException.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,55 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * #L%
+ */
+
+package javax.ws.rs.client;
+
+import javax.ws.rs.ProcessingException;
+import javax.ws.rs.core.Response;
+
+
+public class ResponseProcessingException extends ProcessingException {
+
+    private static final long serialVersionUID = -4923161617935731839L;
+
+    private final Response response;
+
+
+    public ResponseProcessingException(Response response, Throwable cause) {
+        super(cause);
+        this.response = response;
+    }
+
+
+    public ResponseProcessingException(Response response, String message, Throwable cause) {
+        super(message, cause);
+        this.response = response;
+    }
+
+
+    public ResponseProcessingException(Response response, String message) {
+        super(message);
+        this.response = response;
+    }
+
+
+    public Response getResponse() {
+        return response;
+    }
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/SyncInvoker.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/SyncInvoker.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/SyncInvoker.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/SyncInvoker.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,103 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * #L%
+ */
+
+package javax.ws.rs.client;
+
+import javax.ws.rs.core.GenericType;
+import javax.ws.rs.core.Response;
+
+
+public interface SyncInvoker {
+
+
+    Response get();
+
+
+    <T> T get(Class<T> responseType);
+
+
+    <T> T get(GenericType<T> responseType);
+
+
+    Response put(Entity<?> entity);
+
+
+    <T> T put(Entity<?> entity, Class<T> responseType);
+
+
+    <T> T put(Entity<?> entity, GenericType<T> responseType);
+
+
+    Response post(Entity<?> entity);
+
+
+    <T> T post(Entity<?> entity, Class<T> responseType);
+
+
+    <T> T post(Entity<?> entity, GenericType<T> responseType);
+
+
+    Response delete();
+
+
+    <T> T delete(Class<T> responseType);
+
+
+    <T> T delete(GenericType<T> responseType);
+
+
+    Response head();
+
+
+    Response options();
+
+
+    <T> T options(Class<T> responseType);
+
+
+    <T> T options(GenericType<T> responseType);
+
+
+    Response trace();
+
+
+    <T> T trace(Class<T> responseType);
+
+
+    <T> T trace(GenericType<T> responseType);
+
+
+    Response method(String name);
+
+
+    <T> T method(String name, Class<T> responseType);
+
+
+    <T> T method(String name, GenericType<T> responseType);
+
+
+    Response method(String name, Entity<?> entity);
+
+
+    <T> T method(String name, Entity<?> entity, Class<T> responseType);
+
+
+    <T> T method(String name, Entity<?> entity, GenericType<T> responseType);
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/WebTarget.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/WebTarget.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/WebTarget.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/WebTarget.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,72 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * #L%
+ */
+
+package javax.ws.rs.client;
+
+import javax.ws.rs.core.Configurable;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.UriBuilder;
+import java.net.URI;
+import java.util.Map;
+
+
+public interface WebTarget extends Configurable<WebTarget> {
+
+
+    URI getUri();
+
+
+    UriBuilder getUriBuilder();
+
+
+    WebTarget path(String path);
+
+
+    WebTarget resolveTemplate(String name, Object value);
+
+
+    WebTarget resolveTemplate(String name, Object value, boolean encodeSlashInPath);
+
+
+    WebTarget resolveTemplateFromEncoded(String name, Object value);
+
+
+    WebTarget resolveTemplates(Map<String, Object> templateValues);
+
+    WebTarget resolveTemplates(Map<String, Object> templateValues, boolean encodeSlashInPath);
+
+
+    WebTarget resolveTemplatesFromEncoded(Map<String, Object> templateValues);
+
+
+    WebTarget matrixParam(String name, Object... values);
+
+
+    WebTarget queryParam(String name, Object... values);
+
+
+    Invocation.Builder request();
+
+
+    Invocation.Builder request(String... acceptedResponseTypes);
+
+
+    Invocation.Builder request(MediaType... acceptedResponseTypes);
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/package-info.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/package-info.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/package-info.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/client/package-info.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,22 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * #L%
+ */
+
+
+package javax.ws.rs.client;

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/AsyncResponse.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/AsyncResponse.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/AsyncResponse.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/AsyncResponse.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,73 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * #L%
+ */
+
+package javax.ws.rs.container;
+
+import java.util.Collection;
+import java.util.Date;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+
+
+public interface AsyncResponse {
+    long NO_TIMEOUT = 0;
+
+
+    boolean resume(Object response);
+
+
+    boolean resume(Throwable response);
+
+
+    boolean cancel();
+
+
+    boolean cancel(int retryAfter);
+
+
+    boolean cancel(Date retryAfter);
+
+
+    boolean isSuspended();
+
+
+    boolean isCancelled();
+
+
+    boolean isDone();
+
+
+    boolean setTimeout(long time, TimeUnit unit);
+
+
+    void setTimeoutHandler(TimeoutHandler handler);
+
+
+    Collection<Class<?>> register(Class<?> callback);
+
+
+    Map<Class<?>, Collection<Class<?>>> register(Class<?> callback, Class<?>... callbacks);
+
+
+    Collection<Class<?>> register(Object callback);
+
+
+    Map<Class<?>, Collection<Class<?>>> register(Object callback, Object... callbacks);
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/CompletionCallback.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/CompletionCallback.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/CompletionCallback.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/CompletionCallback.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,27 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * #L%
+ */
+
+package javax.ws.rs.container;
+
+
+public interface CompletionCallback {
+
+    public void onComplete(Throwable throwable);
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/ConnectionCallback.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/ConnectionCallback.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/ConnectionCallback.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/ConnectionCallback.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,27 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * #L%
+ */
+
+package javax.ws.rs.container;
+
+
+public interface ConnectionCallback {
+
+    void onDisconnect(AsyncResponse disconnected);
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/ContainerRequestContext.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/ContainerRequestContext.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/ContainerRequestContext.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/ContainerRequestContext.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,115 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * #L%
+ */
+
+package javax.ws.rs.container;
+
+import javax.ws.rs.core.Cookie;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.MultivaluedMap;
+import javax.ws.rs.core.Request;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.SecurityContext;
+import javax.ws.rs.core.UriInfo;
+import java.io.InputStream;
+import java.net.URI;
+import java.util.Collection;
+import java.util.Date;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+
+
+public interface ContainerRequestContext {
+
+
+    Object getProperty(String name);
+
+
+    Collection<String> getPropertyNames();
+
+
+    void setProperty(String name, Object object);
+
+
+    void removeProperty(String name);
+
+
+    UriInfo getUriInfo();
+
+
+    void setRequestUri(URI requestUri);
+
+
+    void setRequestUri(URI baseUri, URI requestUri);
+
+
+    Request getRequest();
+
+
+    String getMethod();
+
+
+    void setMethod(String method);
+
+
+    MultivaluedMap<String, String> getHeaders();
+
+
+    String getHeaderString(String name);
+
+
+    Date getDate();
+
+
+    Locale getLanguage();
+
+
+    int getLength();
+
+
+    MediaType getMediaType();
+
+
+    List<MediaType> getAcceptableMediaTypes();
+
+
+    List<Locale> getAcceptableLanguages();
+
+
+    Map<String, Cookie> getCookies();
+
+
+    boolean hasEntity();
+
+
+    InputStream getEntityStream();
+
+
+    void setEntityStream(InputStream input);
+
+
+    SecurityContext getSecurityContext();
+
+
+    void setSecurityContext(SecurityContext context);
+
+
+    void abortWith(Response response);
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/ContainerRequestFilter.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/ContainerRequestFilter.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/ContainerRequestFilter.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/ContainerRequestFilter.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,30 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * #L%
+ */
+
+package javax.ws.rs.container;
+
+import java.io.IOException;
+
+
+public interface ContainerRequestFilter {
+
+
+    public void filter(ContainerRequestContext requestContext) throws IOException;
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/ContainerResponseContext.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/ContainerResponseContext.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/ContainerResponseContext.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/ContainerResponseContext.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,127 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * #L%
+ */
+
+package javax.ws.rs.container;
+
+import javax.ws.rs.core.EntityTag;
+import javax.ws.rs.core.Link;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.MultivaluedMap;
+import javax.ws.rs.core.NewCookie;
+import javax.ws.rs.core.Response;
+import java.io.OutputStream;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
+import java.net.URI;
+import java.util.Date;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
+
+
+public interface ContainerResponseContext {
+
+
+    int getStatus();
+
+
+    void setStatus(int code);
+
+
+    Response.StatusType getStatusInfo();
+
+
+    void setStatusInfo(Response.StatusType statusInfo);
+
+
+    MultivaluedMap<String, Object> getHeaders();
+
+
+    abstract MultivaluedMap<String, String> getStringHeaders();
+
+
+    String getHeaderString(String name);
+
+
+    Set<String> getAllowedMethods();
+
+
+    Date getDate();
+
+
+    Locale getLanguage();
+
+
+    int getLength();
+
+
+    MediaType getMediaType();
+
+
+    Map<String, NewCookie> getCookies();
+
+
+    EntityTag getEntityTag();
+
+
+    Date getLastModified();
+
+
+    URI getLocation();
+
+
+    Set<Link> getLinks();
+
+
+    boolean hasLink(String relation);
+
+
+    Link getLink(String relation);
+
+
+    Link.Builder getLinkBuilder(String relation);
+
+
+    boolean hasEntity();
+
+
+    Object getEntity();
+
+
+    Class<?> getEntityClass();
+
+
+    Type getEntityType();
+
+
+    void setEntity(final Object entity);
+
+
+    void setEntity(final Object entity, final Annotation[] annotations, final MediaType mediaType);
+
+
+    Annotation[] getEntityAnnotations();
+
+
+    OutputStream getEntityStream();
+
+
+    void setEntityStream(OutputStream outputStream);
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/ContainerResponseFilter.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/ContainerResponseFilter.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/ContainerResponseFilter.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/ContainerResponseFilter.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,30 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * #L%
+ */
+
+package javax.ws.rs.container;
+
+import java.io.IOException;
+
+
+public interface ContainerResponseFilter {
+
+
+    public void filter(ContainerRequestContext requestContext, ContainerResponseContext responseContext) throws IOException;
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/DynamicFeature.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/DynamicFeature.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/DynamicFeature.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/DynamicFeature.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,30 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * #L%
+ */
+
+package javax.ws.rs.container;
+
+import javax.ws.rs.core.FeatureContext;
+
+
+public interface DynamicFeature {
+
+
+    void configure(ResourceInfo resourceInfo, FeatureContext context);
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/PreMatching.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/PreMatching.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/PreMatching.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/PreMatching.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,34 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * #L%
+ */
+
+package javax.ws.rs.container;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+
+@Target({ElementType.TYPE})
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface PreMatching {
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/ResourceContext.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/ResourceContext.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/ResourceContext.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/ResourceContext.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,30 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * #L%
+ */
+
+package javax.ws.rs.container;
+
+public interface ResourceContext {
+
+
+    <T> T getResource(Class<T> resourceClass);
+
+
+    <T> T initResource(T resource);
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/ResourceInfo.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/ResourceInfo.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/ResourceInfo.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/ResourceInfo.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,33 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * #L%
+ */
+
+package javax.ws.rs.container;
+
+import java.lang.reflect.Method;
+
+
+public interface ResourceInfo {
+
+
+    Method getResourceMethod();
+
+
+    Class<?> getResourceClass();
+}



Mime
View raw message