MessageHandler.java revision 608:7e06bf1dcb09
1/*
2 * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.  Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25package com.sun.corba.se.impl.protocol.giopmsgheaders;
26
27import java.io.IOException;
28
29/**
30 * Interface which allows an implementation to use
31 * double dispatch when processing the various
32 * concrete message types found in this package.
33 */
34public interface MessageHandler
35{
36    //
37    // REVISIT - These should not throw IOException.
38    //           Should be handled internally.
39
40    /**
41     * Used for message types for which we don't have concrete classes, yet,
42     * such as CloseConnection and MessageError, as well as unknown types.
43     */
44    void handleInput(Message header) throws IOException;
45
46    // Request
47    void handleInput(RequestMessage_1_0 header) throws IOException;
48    void handleInput(RequestMessage_1_1 header) throws IOException;
49    void handleInput(RequestMessage_1_2 header) throws IOException;
50
51    // Reply
52    void handleInput(ReplyMessage_1_0 header) throws IOException;
53    void handleInput(ReplyMessage_1_1 header) throws IOException;
54    void handleInput(ReplyMessage_1_2 header) throws IOException;
55
56    // LocateRequest
57    void handleInput(LocateRequestMessage_1_0 header) throws IOException;
58    void handleInput(LocateRequestMessage_1_1 header) throws IOException;
59    void handleInput(LocateRequestMessage_1_2 header) throws IOException;
60
61    // LocateReply
62    void handleInput(LocateReplyMessage_1_0 header) throws IOException;
63    void handleInput(LocateReplyMessage_1_1 header) throws IOException;
64    void handleInput(LocateReplyMessage_1_2 header) throws IOException;
65
66    // Fragment
67    void handleInput(FragmentMessage_1_1 header) throws IOException;
68    void handleInput(FragmentMessage_1_2 header) throws IOException;
69
70    // CancelRequest
71    void handleInput(CancelRequestMessage header) throws IOException;
72}
73