View Javadoc

1   /*
2    * Copyright (c) 2012 the original author or authors.
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *     http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  
17  package org.eclipse.jetty.spdy.api;
18  
19  /**
20   * <p>A container for GOAWAY frames metadata: the last good stream id and
21   * the session status.</p>
22   */
23  public class GoAwayInfo
24  {
25      private final int lastStreamId;
26      private final SessionStatus sessionStatus;
27  
28      /**
29       * <p>Creates a new {@link GoAwayInfo} with the given last good stream id and session status</p>
30       *
31       * @param lastStreamId  the last good stream id
32       * @param sessionStatus the session status
33       */
34      public GoAwayInfo(int lastStreamId, SessionStatus sessionStatus)
35      {
36          this.lastStreamId = lastStreamId;
37          this.sessionStatus = sessionStatus;
38      }
39  
40      /**
41       * @return the last good stream id
42       */
43      public int getLastStreamId()
44      {
45          return lastStreamId;
46      }
47  
48      /**
49       * @return the session status
50       */
51      public SessionStatus getSessionStatus()
52      {
53          return sessionStatus;
54      }
55  }