org.eclipse.wst.server.core
Class ServerPort
java.lang.Object
org.eclipse.wst.server.core.ServerPort
-
public class ServerPort
- extends java.lang.Object
This class represents a port on a server.
-
Since:
- 1.0
Constructor Summary
|
ServerPort
(java.lang.String id,
java.lang.String name,
int port,
java.lang.String protocol)
Create a new server port. |
ServerPort
(java.lang.String id,
java.lang.String name,
int port,
java.lang.String protocol,
java.lang.String[] contentTypes,
boolean advanced)
Create a new server port. |
Method Summary
|
boolean
|
equals
(java.lang.Object obj)
|
java.lang.String[]
|
getContentTypes
()
Returns the content types that this port would normally serve, or null
if the content is unknown. |
java.lang.String
|
getId
()
Return an optional internal id used to identify this port. |
java.lang.String
|
getName
()
Return the name of the port. |
int
|
getPort
()
Return the actual port number. |
java.lang.String
|
getProtocol
()
Returns the protocol, e.g. |
int
|
hashCode
()
|
boolean
|
isAdvanced
()
Returns true if this port is an "advanced" port and should not be shown
to novice users. |
java.lang.String
|
toString
()
|
Methods inherited from class java.lang.Object
|
getClass, notify, notifyAll, wait, wait, wait
|
ServerPort
public ServerPort(java.lang.String id,
java.lang.String name,
int port,
java.lang.String protocol)
- Create a new server port.
-
Parameters:
-
id
- a server-specific port id -
name
- a human-readable name for the port -
port
- the number number -
protocol
- the port's protocol
ServerPort
public ServerPort(java.lang.String id,
java.lang.String name,
int port,
java.lang.String protocol,
java.lang.String[] contentTypes,
boolean advanced)
- Create a new server port.
-
Parameters:
-
id
- a server-specific port id -
name
- a human-readable name for the port -
port
- the number number -
protocol
- the port's protocol -
contentTypes
- the content types that the port supports -
advanced
- true
if the port is "advanced" and should only
be shown to advanced users, false
otherwise
getId
public java.lang.String getId()
- Return an optional internal id used to identify this port.
-
-
Returns:
- an internal id
getName
public java.lang.String getName()
- Return the name of the port.
-
-
Returns:
- the name of the port
getPort
public int getPort()
- Return the actual port number.
-
-
Returns:
- the port number
getProtocol
public java.lang.String getProtocol()
- Returns the protocol, e.g. HTTP of this port. Returns null
if the protocol is unknown.
-
-
Returns:
- the procotol
getContentTypes
public java.lang.String[] getContentTypes()
- Returns the content types that this port would normally serve, or null
if the content is unknown.
-
-
Returns:
- a possibly empty array of content types
isAdvanced
public boolean isAdvanced()
- Returns true if this port is an "advanced" port and should not be shown
to novice users.
-
-
Returns:
-
true
if the port is advanced, or false
otherwise
equals
public boolean equals(java.lang.Object obj)
-
-
Overrides:
-
equals
in class java.lang.Object
-
-
See Also:
-
Object.equals(Object)
hashCode
public int hashCode()
-
-
Overrides:
-
hashCode
in class java.lang.Object
-
-
See Also:
-
Object.hashCode()
toString
public java.lang.String toString()
-
-
Overrides:
-
toString
in class java.lang.Object
-
-
See Also:
-
Object.toString()