KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > j2ee > deployment > plugins > api > ServerDebugInfo


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 /*
21  * ServerDebugInfo.java
22  *
23  */

24
25 package org.netbeans.modules.j2ee.deployment.plugins.api;
26
27 /**
28  * Class to communicate the debugging information between plugin, server api and IDE.
29  * @author Martin Grebac
30  * @version 0.1
31  */

32
33 public class ServerDebugInfo {
34
35     public static final String JavaDoc TRANSPORT_SOCKET = "dt_socket"; //NOI18N
36
public static final String JavaDoc TRANSPORT_SHMEM = "dt_shmem"; //NOI18N
37

38     /**
39      * Holds value of property transport - socket or shared memory.
40      */

41     private String JavaDoc transport = TRANSPORT_SOCKET;
42
43     /**
44      * Holds value of property host - where the target vm is running.
45      */

46     private String JavaDoc host = "localhost"; //NOI18N
47

48     /**
49      * Holds value of property shmemName - shared memory name of the target vm.
50      */

51     private String JavaDoc shmemName = "";
52     
53     /**
54      * Holds value of property port - port number of the target vm..
55      */

56     private int port;
57     
58     public ServerDebugInfo(String JavaDoc host, String JavaDoc shmemName) {
59         setTransport(TRANSPORT_SHMEM);
60         setHost(host);
61         setShmemName(shmemName);
62     }
63     
64     public ServerDebugInfo(String JavaDoc host, int port) {
65         setTransport(TRANSPORT_SOCKET);
66         setHost(host);
67         setPort(port);
68     }
69     
70     /**
71      * Getter for property transport.
72      * @return Value of property transport.
73      */

74     public String JavaDoc getTransport() {
75         return this.transport;
76     }
77     
78     /**
79      * Setter for property transport.
80      * @param transport New value of property transport.
81      */

82     public void setTransport(String JavaDoc transport) {
83         this.transport = transport;
84     }
85     
86     /**
87      * Getter for property host.
88      * @return Value of property host.
89      */

90     public String JavaDoc getHost() {
91         return this.host;
92     }
93     
94     /**
95      * Setter for property host.
96      * @param host New value of property host.
97      */

98     public void setHost(String JavaDoc host) {
99         this.host = host;
100     }
101     
102     /**
103      * Getter for property address.
104      * @return Value of property address.
105      */

106     public String JavaDoc getShmemName() {
107         return this.shmemName;
108     }
109     
110     /**
111      * Setter for property address.
112      * @param address New value of property address.
113      */

114     public void setShmemName(String JavaDoc shmemName) {
115         this.shmemName = shmemName;
116     }
117     
118     /**
119      * Getter for property port.
120      * @return Value of property port.
121      */

122     public int getPort() {
123         return this.port;
124     }
125     
126     /**
127      * Setter for property port.
128      * @param port New value of property port.
129      */

130     public void setPort(int port) {
131         this.port = port;
132     }
133     
134 }
135
Popular Tags