KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > jmeter > protocol > tcp > sampler > TCPClient


1 // $Header: /home/cvs/jakarta-jmeter/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPClient.java,v 1.5.2.1 2004/04/02 22:43:29 sebb Exp $
2
/*
3  * Copyright 2003-2004 The Apache Software Foundation.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * 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 /*
20  * Created on 24-Sep-2003
21  *
22  * Interface for generic TCP protocol handler
23  *
24  */

25 package org.apache.jmeter.protocol.tcp.sampler;
26
27 import java.io.InputStream JavaDoc;
28 import java.io.OutputStream JavaDoc;
29
30 /**
31  * @version $Revision: 1.5.2.1 $ $Date: 2004/04/02 22:43:29 $
32  */

33 public interface TCPClient
34 {
35     void setupTest();
36     void teardownTest();
37     
38     /**
39      *
40      * @param os - OutputStream for socket
41      * @param is - InputStream to be written to Socket
42      */

43     void write(OutputStream JavaDoc os, InputStream JavaDoc is);
44
45     /**
46      *
47      * @param os - OutputStream for socket
48      * @param s - String to write
49      */

50     void write(OutputStream JavaDoc os, String JavaDoc s);
51
52     /**
53      *
54      * @param is - InputStream for socket
55      * @return String read from socket
56      */

57     String JavaDoc read(InputStream JavaDoc is);
58     
59     /**
60      * @return Returns the eolByte.
61      */

62     public byte getEolByte();
63
64     /**
65      * @param eolByte The eolByte to set.
66      */

67     public void setEolByte(byte eolByte);
68 }
Popular Tags