inital plugin from webtools project
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.monitor.ui / src / net / sourceforge / phpdt / monitor / ui / IContentViewer.java
1 /**********************************************************************
2  * Copyright (c) 2003 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Common Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/cpl-v10.html
7  *
8  * Contributors:
9  *    IBM - Initial API and implementation
10  **********************************************************************/
11 package net.sourceforge.phpdt.monitor.ui;
12
13 import org.eclipse.swt.widgets.Composite;
14 /**
15  * Viewer interface for displaying request and response messages
16  */
17 public interface IContentViewer {
18         //message to display
19         //public static final byte REQUEST_MSG = 0;
20         //public static final byte RESPONSE_MSG = 1;
21
22         /**
23          * Initializes the viewer so it can be used to display 
24          * TCP/IP messages.  Requires the parent Composite that the
25          * viewer will display its information in, and a byte message
26          * (IRequestResponseViewer.REQUEST_MSG or IRequestResponseViewer.RESPONSE_MSG)
27          * to display either the tcpip request information, or the tcpip response
28          * information
29          * @param parent org.eclipse.widgets.Composite
30          * @param message byte
31          */
32         public void init(Composite parent);
33         
34         /**
35          * Sets the IRequest object that the viewer is
36          * currently displaying.  The parameter should be null if
37          * no IRequest object is to be displayed.
38          * @param reqresp org.eclipse.tcpip.monitor.IRequest
39          */
40         public void setContent(byte[] b);
41                 
42         /**
43          * Disposes the Composite containing this viewer's TCP/IP message display
44          */
45         public void dispose(); 
46 }