001/* 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017 018package org.apache.wicket.protocol.ws.api; 019 020import java.net.URI; 021import java.security.Principal; 022import java.util.List; 023import java.util.Map; 024 025/** 026 * Wicket proxy interface to javax.websocket.Session. 027 */ 028public interface IWebSocketSession 029{ 030 031 /** 032 * See javax.websocket.Session#getProtocolVersion() 033 */ 034 String getProtocolVersion(); 035 036 037 /** 038 * See javax.websocket.Session#getNegotiatedSubprotocol() 039 */ 040 String getNegotiatedSubprotocol(); 041 042 043 /** 044 * See javax.websocket.Session#isSecure() 045 */ 046 boolean isSecure(); 047 048 /** 049 * See javax.websocket.Session#isOpen() 050 */ 051 boolean isOpen(); 052 053 /** 054 * See javax.websocket.Session#getMaxIdleTimeout() 055 */ 056 long getMaxIdleTimeout(); 057 058 /** 059 * See javax.websocket.Session#setMaxIdleTimeout() 060 */ 061 void setMaxIdleTimeout(long milliseconds); 062 063 /** 064 * See javax.websocket.Session#setMaxBinaryMessageBufferSize() 065 */ 066 void setMaxBinaryMessageBufferSize(int length); 067 068 /** 069 * See javax.websocket.Session#getMaxBinaryMessageBufferSize() 070 */ 071 int getMaxBinaryMessageBufferSize(); 072 073 /** 074 * See javax.websocket.Session#setMaxTextMessageBufferSize() 075 */ 076 void setMaxTextMessageBufferSize(int length); 077 078 /** 079 * See javax.websocket.Session#getMaxTextMessageBufferSize() 080 */ 081 int getMaxTextMessageBufferSize(); 082 083 084 /** 085 * See javax.websocket.Session#getId() 086 */ 087 String getId(); 088 089 090 /** 091 * See javax.websocket.Session#getRequestURI() 092 */ 093 URI getRequestURI(); 094 095 /** 096 * See javax.websocket.Session#getRequestParameterMap() 097 */ 098 Map<String, List<String>> getRequestParameterMap(); 099 100 /** 101 * See javax.websocket.Session#getQueryString() 102 */ 103 String getQueryString(); 104 105 /** 106 * See javax.websocket.Session#getPathParameters() 107 */ 108 Map<String, String> getPathParameters(); 109 110 /** 111 * See javax.websocket.Session#getUserProperties() 112 */ 113 Map<String, Object> getUserProperties(); 114 115 /** 116 * See javax.websocket.Session#getUserPrincipal() 117 */ 118 Principal getUserPrincipal(); 119}