inital plugin from webtools project
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.monitor.core / src / net / sourceforge / phpdt / monitor / core / IRequest.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.core;
12
13 import java.util.Date;
14 /**
15  * 
16  */
17 public interface IRequest {
18         public static final byte TRANSPORT = 1;
19         public static final byte CONTENT = 2;
20         public static final byte ALL = 3;
21
22         /**
23          * Return the type of the request.
24          * 
25          * @return net.sourceforge.phpdt.monitor.core.IType
26          */
27         public IProtocolAdapter getType();
28
29         /**
30          * Return the date/time of this request.
31          *
32          * @return java.util.Date
33          */
34         public Date getDate();
35
36         /**
37          * Returns the local port.
38          *
39          * @return int
40          */
41         public int getLocalPort();
42
43         /**
44          * Returns the remote host.
45          *
46          * @return java.lang.String
47          */
48         public String getRemoteHost();
49
50         /**
51          * Returns the remote port.
52          *
53          * @return int
54          */
55         public int getRemotePort();
56
57         /**
58          * Returns the request as a byte array.
59          *
60          * @return byte[]
61          */
62         public byte[] getRequest(byte type);
63
64         /**
65          * Returns the response as a byte array.
66          *
67          * @return byte[]
68          */
69         public byte[] getResponse(byte type);
70
71         /**
72          * Returns the response time in milliseconds.
73          *
74          * @return long
75          */
76         public long getResponseTime();
77
78         /**
79          * Returns a label for this request.
80          *
81          * @return java.lang.String
82          */
83         public String getLabel();
84
85         /**
86          * 
87          */
88         public void addProperty(String key, Object value);
89
90         /**
91          * 
92          */
93         public String getStringProperty(String key);
94
95         /**
96          * 
97          */
98         public Integer getIntegerProperty(String key);
99
100         /**
101          * 
102          */
103         public Object getObjectProperty(String key);
104         
105         /**
106          * 
107          */
108         public void fireChangedEvent();
109 }