View Javadoc

1   //
2   //  ========================================================================
3   //  Copyright (c) 1995-2015 Mort Bay Consulting Pty. Ltd.
4   //  ------------------------------------------------------------------------
5   //  All rights reserved. This program and the accompanying materials
6   //  are made available under the terms of the Eclipse Public License v1.0
7   //  and Apache License v2.0 which accompanies this distribution.
8   //
9   //      The Eclipse Public License is available at
10  //      http://www.eclipse.org/legal/epl-v10.html
11  //
12  //      The Apache License v2.0 is available at
13  //      http://www.opensource.org/licenses/apache2.0.php
14  //
15  //  You may elect to redistribute this code under either of these licenses.
16  //  ========================================================================
17  //
18  
19  package org.eclipse.jetty.websocket.common.scopes;
20  
21  import java.util.concurrent.Executor;
22  
23  import org.eclipse.jetty.io.ByteBufferPool;
24  import org.eclipse.jetty.util.DecoratedObjectFactory;
25  import org.eclipse.jetty.util.ssl.SslContextFactory;
26  import org.eclipse.jetty.websocket.api.WebSocketPolicy;
27  
28  /**
29   * Defined Scope for a WebSocketContainer.
30   */
31  public interface WebSocketContainerScope
32  {
33      /**
34       * The configured Container Buffer Pool.
35       * 
36       * @return the buffer pool (never null)
37       */
38      public ByteBufferPool getBufferPool();
39  
40      /**
41       * Executor in use by the container.
42       * 
43       * @return the Executor in use by the container.
44       */
45      public Executor getExecutor();
46  
47      /**
48       * Object Factory used to create objects.
49       * 
50       * @return Object Factory used to create instances of objects.
51       */
52      public DecoratedObjectFactory getObjectFactory();
53  
54      /**
55       * The policy the container is running on.
56       * 
57       * @return the websocket policy
58       */
59      public WebSocketPolicy getPolicy();
60  
61      /**
62       * The SslContextFactory in use by the container.
63       * 
64       * @return the SslContextFactory in use by the container (can be null if no SSL context is defined)
65       */
66      public SslContextFactory getSslContextFactory();
67  }