|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--hypercast.INETv4TwoPorts
This class implements a physical address which works on the TCP/IP networks and contains a IP version 4 address and two port numbers.
Field Summary | |
static int |
ADDRESS_SIZE
The size of INETv4TwoPorts type physical address when carried in the packet. |
Constructor Summary | |
INETv4TwoPorts(byte[] byteAddrPort)
Constructs a INETv4TwoPorts object from a byte array. |
|
INETv4TwoPorts(java.net.InetAddress a,
int nodeport,
int scktport)
Constructs a INETv4AndOnePort object from an InetAddress instance and two port numbers. |
|
INETv4TwoPorts(hypercast.INETv4TwoPorts a)
Constructs a INETv4TwoPorts object with another INETv4TwoPorts object. |
|
INETv4TwoPorts(int nodeport,
int scktport)
Constructs a INETv4TwoPorts object with two port numbers. |
|
INETv4TwoPorts(java.lang.String addrAndPortsString)
Constructs a INETv4TwoPorts object with a string representing address and two port numbers. |
Method Summary | |
boolean |
addressCheck(java.lang.Object obj)
Test if the node adapter related part of two INETv4TwoPorts address are identical. |
boolean |
equals(java.lang.Object obj)
Test if two INETv4TwoPorts address are identical. |
java.net.InetAddress |
getInetAddress()
Gets INETv4 address of this object. |
int |
getNodeAdptPort()
Return the first port number in ths physical address. |
static java.lang.String[] |
getPartsFromAddrAndPortsString(java.lang.String addrAndPortString)
Get different parts from a string which carries address and ports information. |
int |
getScktAdptPort()
Return the second port number in ths physical address. |
int |
getSize()
Returns the byte array size |
boolean |
greaterThan(hypercast.I_Address addr)
Compares two INETv4TwoPorts address objects. |
int |
hashCode()
Returns a hashcode of this object It is important that the argument is of type Object so that
it can be used in a Hashtable . |
byte[] |
toByteArray()
Converts the Address/Port1/Port2 to a 8 bytes array. |
java.lang.String |
toString()
Converts the IP address object to string format "xxx.xxx.xxx.xxx/port1/port2" (e.g. |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int ADDRESS_SIZE
Constructor Detail |
public INETv4TwoPorts(hypercast.INETv4TwoPorts a)
a
- An INETv4TwoPorts object.public INETv4TwoPorts(java.lang.String addrAndPortsString)
addrAndPortsString
- An string representing an address
and two port numbers.public INETv4TwoPorts(java.net.InetAddress a, int nodeport, int scktport)
a
- an instance of InetAddressnodeport
- port number for node adapterscktport
- port number for socket adapterpublic INETv4TwoPorts(int nodeport, int scktport)
nodeport
- port number for Node Adapter.scktport
- port number for Socket Adapter.public INETv4TwoPorts(byte[] byteAddrPort)
byteAddrPort
- a byte array storing IP
address and two port numbers.Method Detail |
public static java.lang.String[] getPartsFromAddrAndPortsString(java.lang.String addrAndPortString)
addrAndPortString
- the string of address and ports.public java.net.InetAddress getInetAddress()
public int getNodeAdptPort()
public int getScktAdptPort()
public int getSize()
getSize
in interface I_Address
public byte[] toByteArray()
toByteArray
in interface I_Address
public boolean equals(java.lang.Object obj)
equals
in interface I_Address
equals
in class java.lang.Object
obj
- an object (should be of type INETv4TwoPorts
.)
java.lang.IllegalArgumentException
- if obj
is not of type INETv4TwoPorts
.public boolean addressCheck(java.lang.Object obj)
addressCheck
in interface I_PhysicalAddress
obj
- an object (should be of type INETv4TwoPorts
.)
java.lang.IllegalArgumentException
- if obj
is not of type INETv4TwoPorts
.public boolean greaterThan(hypercast.I_Address addr)
greaterThan
in interface I_Address
addr
- an object of type I_Address
java.lang.IllegalArgumentException
- if obj
is not of type INETv4TwoPorts
.public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
Object
so that
it can be used in a Hashtable
.
hashCode
in interface I_Address
hashCode
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |