01: /*******************************************************************************
02: * Copyright (c) 2000, 2005 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.jdi.internal.connect;
11:
12: import java.io.IOException;
13: import java.io.InputStream;
14: import java.io.OutputStream;
15:
16: import com.sun.jdi.connect.Transport;
17:
18: /**
19: * this class implements the corresponding interfaces
20: * declared by the JDI specification. See the com.sun.jdi package
21: * for more information.
22: *
23: */
24: public abstract class TransportImpl implements Transport {
25: /** Name of Transport. */
26: private String fName;
27:
28: /**
29: * Constructs new SocketTransportImpl.
30: */
31: public TransportImpl(String name) {
32: fName = name;
33: }
34:
35: /**
36: * @return Returns a short identifier for the transport.
37: */
38: public String name() {
39: return fName;
40: }
41:
42: /**
43: * @return Returns true if we have an open connection.
44: */
45: public abstract boolean isOpen();
46:
47: /**
48: * Closes connection.
49: */
50: public abstract void close();
51:
52: /**
53: * @return Returns InputStream from Virtual Machine.
54: */
55: public abstract InputStream getInputStream() throws IOException;
56:
57: /**
58: * @return Returns OutputStream to Virtual Machine.
59: */
60: public abstract OutputStream getOutputStream() throws IOException;
61: }
|