01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17:
18: /**
19: * @author Boris Kuznetsov
20: * @version $Revision$
21: */package org.apache.harmony.xnet.provider.jsse;
22:
23: import org.apache.harmony.xnet.provider.jsse.Message;
24:
25: import java.io.IOException;
26:
27: /**
28: *
29: * Represents server hello done message
30: * @see TLS 1.0 spec., 7.4.5. Server hello done
31: * (http://www.ietf.org/rfc/rfc2246.txt)
32: *
33: */
34: public class ServerHelloDone extends Message {
35:
36: /**
37: * Creates outbound message
38: *
39: */
40: public ServerHelloDone() {
41: }
42:
43: /**
44: * Creates inbound message
45: * @param in
46: * @param length
47: * @throws IOException
48: */
49: public ServerHelloDone(HandshakeIODataStream in, int length)
50: throws IOException {
51: if (length != 0) {
52: fatalAlert(AlertProtocol.DECODE_ERROR,
53: "DECODE ERROR: incorrect ServerHelloDone");
54: }
55: }
56:
57: /**
58: * Sends message
59: * @param out
60: */
61: public void send(HandshakeIODataStream out) {
62: }
63:
64: /**
65: * Returns message length
66: * @return
67: */
68: public int length() {
69: return 0;
70: }
71:
72: /**
73: * Returns message type
74: * @return
75: */
76: public int getType() {
77: return Handshake.SERVER_HELLO_DONE;
78: }
79: }
|