KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > mx4j > tools > remote > AbstractConnection


1 /*
2  * Copyright (C) The MX4J Contributors.
3  * All rights reserved.
4  *
5  * This software is distributed under the terms of the MX4J License version 1.0.
6  * See the terms of the MX4J License in the documentation provided with this software.
7  */

8
9 package mx4j.tools.remote;
10
11 import java.io.IOException JavaDoc;
12
13 /**
14  * Implementation of the Connection interface, to be used on the server-side end of the connection.
15  *
16  * @version $Revision: 1.4 $
17  */

18 public abstract class AbstractConnection implements Connection
19 {
20    private final String JavaDoc connectionId;
21    private final ConnectionManager manager;
22
23    protected AbstractConnection(String JavaDoc connectionId, ConnectionManager manager)
24    {
25       this.connectionId = connectionId;
26       this.manager = manager;
27    }
28
29    public void close() throws IOException JavaDoc
30    {
31       manager.closeConnection(this);
32    }
33
34    public String JavaDoc getConnectionId() throws IOException JavaDoc
35    {
36       return connectionId;
37    }
38 }
39
Popular Tags