2 * Copyright (C) 2009 The Android Open Source Project
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 package org.apache.harmony.xnet.provider.jsse;
19 import javax.net.ssl.SSLSession;
20 import javax.net.ssl.SSLSessionContext;
21 import java.security.cert.Certificate;
22 import java.security.Principal;
24 class FakeSession implements SSLSession {
27 FakeSession(String host) {
31 public int getApplicationBufferSize() {
32 throw new UnsupportedOperationException();
35 public String getCipherSuite() {
36 throw new UnsupportedOperationException();
39 public long getCreationTime() {
40 throw new UnsupportedOperationException();
43 public byte[] getId() {
44 return host.getBytes();
47 public long getLastAccessedTime() {
48 throw new UnsupportedOperationException();
51 public Certificate[] getLocalCertificates() {
52 throw new UnsupportedOperationException();
55 public Principal getLocalPrincipal() {
56 throw new UnsupportedOperationException();
59 public int getPacketBufferSize() {
60 throw new UnsupportedOperationException();
63 public javax.security.cert.X509Certificate[] getPeerCertificateChain() {
64 throw new UnsupportedOperationException();
67 public Certificate[] getPeerCertificates() {
68 throw new UnsupportedOperationException();
71 public String getPeerHost() {
75 public int getPeerPort() {
79 public Principal getPeerPrincipal() {
80 throw new UnsupportedOperationException();
83 public String getProtocol() {
84 throw new UnsupportedOperationException();
87 public SSLSessionContext getSessionContext() {
88 throw new UnsupportedOperationException();
91 public Object getValue(String name) {
92 throw new UnsupportedOperationException();
95 public String[] getValueNames() {
96 throw new UnsupportedOperationException();
99 public void invalidate() {
100 throw new UnsupportedOperationException();
103 public boolean isValid() {
104 throw new UnsupportedOperationException();
107 public void putValue(String name, Object value) {
108 throw new UnsupportedOperationException();
111 public void removeValue(String name) {
112 throw new UnsupportedOperationException();