KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdi > internal > connect > TransportImpl


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.jdi.internal.connect;
12
13
14 import java.io.IOException JavaDoc;
15 import java.io.InputStream JavaDoc;
16 import java.io.OutputStream JavaDoc;
17
18 import com.sun.jdi.connect.Transport;
19
20 /**
21  * this class implements the corresponding interfaces
22  * declared by the JDI specification. See the com.sun.jdi package
23  * for more information.
24  *
25  */

26 public abstract class TransportImpl implements Transport {
27     /** Name of Transport. */
28     private String JavaDoc fName;
29     
30     /**
31      * Constructs new SocketTransportImpl.
32      */

33     public TransportImpl(String JavaDoc name) {
34         fName = name;
35     }
36
37     /**
38      * @return Returns a short identifier for the transport.
39      */

40     public String JavaDoc name() {
41         return fName;
42     }
43
44     /**
45      * @return Returns true if we have an open connection.
46      */

47     public abstract boolean isOpen();
48     
49     /**
50      * Closes connection.
51      */

52     public abstract void close();
53
54     /**
55      * @return Returns InputStream from Virtual Machine.
56      */

57     public abstract InputStream JavaDoc getInputStream() throws IOException JavaDoc;
58     
59     /**
60      * @return Returns OutputStream to Virtual Machine.
61      */

62     public abstract OutputStream JavaDoc getOutputStream() throws IOException JavaDoc;
63 }
64
Popular Tags