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: import org.apache.harmony.xnet.provider.jsse.Handshake;
25: import org.apache.harmony.xnet.provider.jsse.HandshakeIODataStream;
26:
27: import java.io.IOException;
28:
29: /**
30: *
31: * Represents Hello Request message
32: * @see TLS 1.0 spec., 7.4.1.1. Hello request
33: * (http://www.ietf.org/rfc/rfc2246.txt)
34: *
35: */
36: public class HelloRequest extends Message {
37:
38: /**
39: * Creates outbound message
40: *
41: */
42: public HelloRequest() {
43: }
44:
45: /**
46: * Creates inbound message
47: * @param in
48: * @param length
49: * @throws IOException
50: */
51: public HelloRequest(HandshakeIODataStream in, int length)
52: throws IOException {
53: if (length != 0) {
54: fatalAlert(AlertProtocol.DECODE_ERROR,
55: "DECODE ERROR: incorrect HelloRequest");
56: }
57: }
58:
59: /**
60: * Sends message
61: * @param out
62: */
63: public void send(HandshakeIODataStream out) {
64: }
65:
66: public int length() {
67: return 0;
68: }
69:
70: /**
71: * Returns message type
72: * @return
73: */
74: public int getType() {
75: return Handshake.HELLO_REQUEST;
76: }
77:
78: }
|