org.fossilec.odettej.transport
Class NetworkAddress

java.lang.Object
  extended by org.fossilec.odettej.transport.NetworkAddress
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
InternetAddress

public abstract class NetworkAddress
extends java.lang.Object
implements java.io.Serializable

This class represents a Network Address with no association to a transportation layer. Subclasses will tipically be associated should be a specific, protocol dependent, implementation.

It provides a general model object used throughout API for making connections.

Author:
Rafael Marins
See Also:
Serialized Form

Constructor Summary
protected NetworkAddress()
          Protected constructor that allow subclasses to create others constructors.
protected NetworkAddress(java.lang.String address)
          General form of creating a NetworkAddress object using the String representation of the address.
 
Method Summary
abstract  java.lang.String getType()
          Return a type string that identifies this address type.
protected abstract  void parse(java.lang.String address)
          Allow the setting up of subclasses context when invoked created through general constructor NetworkAddress(String).
abstract  java.lang.String toString()
          Return a String representation of this address object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NetworkAddress

protected NetworkAddress()
Protected constructor that allow subclasses to create others constructors.


NetworkAddress

protected NetworkAddress(java.lang.String address)
                  throws AddressException
General form of creating a NetworkAddress object using the String representation of the address.

Parameters:
address - String representation of the network address.
Throws:
AddressException - Fail to parse the address.
Method Detail

parse

protected abstract void parse(java.lang.String address)
                       throws AddressException
Allow the setting up of subclasses context when invoked created through general constructor NetworkAddress(String).

Parameters:
address - String representation of the network address.
Throws:
AddressException - Fail to parse the address.

getType

public abstract java.lang.String getType()
Return a type string that identifies this address type.

Returns:
Address type.

toString

public abstract java.lang.String toString()
Return a String representation of this address object.

Overrides:
toString in class java.lang.Object
Returns:
String representation of this address.


Copyright © 2005 ObjectWeb Consortium. All Rights Reserved.