Class JavaAgent.resource.SocketAddress
All Packages Class Hierarchy This Package Previous Next Index
Class JavaAgent.resource.SocketAddress
java.lang.Object
|
+----JavaAgent.resource.AgentAddress
|
+----JavaAgent.resource.SocketAddress
- public class SocketAddress
- extends AgentAddress
Represents the address of an Agent which communicates via a SocketInterface.
Address is represented by a host and port.
Copyright (c) 1995, H. Robert Frost, Stanford University.
All rights reserved.
Copyright (c) 1996, H. Robert Frost, Enterprise Integration Technologies,
Inc. All rights reserved.
RESTRICTED RIGHTS LEGEND: Use, duplication or disclosure by the
Government is subject to restrictions as set forth in
subparagraph(c)(1)(ii) of the Rights in Technical Data and Computer
Software clause at DFARS 252.227-7013 and in similar clauses in the
FAR and NASA FAR supplement.
This software is bound by the terms and conditions listed in the
attached LICENSE file.
-
host
- Internet host name, forms the host portion of a url.
-
port
- Port on the host machine.
-
SocketAddress(String, int)
- Creates a new SocketAddress with the specified host and port.
-
getValue()
- Gets a String representation of the value of the address, used
for sending messages about addresses.
-
toString()
- Returns value of address as string for display.
host
public String host
- Internet host name, forms the host portion of a url. This will either
be a human readable string or an IPaddress.
Example: "piano.stanford.edu".
port
public int port
- Port on the host machine. The Agent having this address will have a
ServerSocket bound to this port.
SocketAddress
public SocketAddress(String h,
int p)
- Creates a new SocketAddress with the specified host and port.
- Parameters:
- h - Address host. Full host name, e.g. piano.stanford.edu, or
IPaddress.
- p - Local port number.
getValue
public String getValue()
- Gets a String representation of the value of the address, used
for sending messages about addresses.
- Returns:
- String value.
- Overrides:
- getValue in class AgentAddress
toString
public String toString()
- Returns value of address as string for display.
- Returns:
- address value
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index