Experts in SMS and MMS Technology. NCLs Provato is an SMS/MMS Gateway supporting  WAP Push, EMS, MMS, SMS, Nokia Smart Messaging, SMPP, CIMD, UCP, MM7, M20, TC35 NCL Technologies Ltd
Provato - SMS MMS Gateway
Mobile Messaging in J2EE & .NET

SwiftNote - Java SMS Toolkit

ie.ncl.msg
Class Address

java.lang.Object
  extended by ie.ncl.msg.Address
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
GsmAddress

public class Address
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

This object is used to specify/determine the source/destination address of a message. The Address object is quite generic and contains a primary string and a set of address attributes. The address can be anything, such as an email address or a mobile number. The underlying connection must however support the address types passed to it. For example, if the address is a mobile number then the underlying connection used to send messages must support mobile telephone numbers as source/destination addresses. An example of such would be an SMS connection. The address object contains an address String, (eg +353801234567), and attributes. The attributes vary from one messaging application to another. SMS specific attributes are discused in the Developers Guide.

See Also:
Message, Sender, Receiver, Serialized Form

Constructor Summary
Address(java.lang.String addr)
          The simplest form of an address is a string.
Address(java.lang.String address, Attributes attributes)
          Create an address specifying its string value and address attributes.
 
Method Summary
 java.lang.Object clone()
          Clone this address.
 Address copy()
           
 boolean equals(Address a)
          Compare with another address.
 boolean equals(java.lang.String a)
          Compare with string representation.
 java.lang.String getAddress()
           
 java.lang.Object getAttribute(java.lang.String name)
          Get a single attribute given the attribute name.
 Attributes getAttributes()
          Get the attributes of the address.
 void putAttribute(java.lang.String name, java.lang.Object value)
          Set the value of an attribute.
 java.lang.Object removeAttribute(java.lang.String name)
          Remove an attribute as specified by the attribute name.
 void setAddress(java.lang.String addr)
           
 java.lang.String toString()
          Convert this address to a string.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Address

public Address(java.lang.String addr)
The simplest form of an address is a string. The string value and attributes depend on the underlying transport connection. e.g. if the underlying transport was SMTP - Simple Mail Transfer Protocol - then the message address could be an email address.

See Also:
Message, Sender, Receiver

Address

public Address(java.lang.String address,
               Attributes attributes)
Create an address specifying its string value and address attributes. The string value and attributes depend on the underlying transport connection. e.g. if the underlying transport was SMTP - Simple Mail Transfer Protocol - then the message address may be an email address.

See Also:
Message, Sender, Receiver
Method Detail

setAddress

public void setAddress(java.lang.String addr)

getAddress

public java.lang.String getAddress()

toString

public java.lang.String toString()
Convert this address to a string.

Overrides:
toString in class java.lang.Object
Returns:
the string value that was used in its construction.

getAttributes

public Attributes getAttributes()
Get the attributes of the address.


getAttribute

public java.lang.Object getAttribute(java.lang.String name)
Get a single attribute given the attribute name. Each attribute has a unique name.


putAttribute

public void putAttribute(java.lang.String name,
                         java.lang.Object value)
Set the value of an attribute. If the attribute is already defined then its value is overwritten.


removeAttribute

public java.lang.Object removeAttribute(java.lang.String name)
Remove an attribute as specified by the attribute name.


equals

public boolean equals(Address a)
Compare with another address. Two address are equal considered if their string values are equal, irrespective of their address attributes.


equals

public boolean equals(java.lang.String a)
Compare with string representation. Two address are considered equal if their string values are equal, irrespective of their address attributes.


clone

public java.lang.Object clone()
Clone this address.

Overrides:
clone in class java.lang.Object

copy

public Address copy()
Returns:
clone of this Address object.

Experts in SMS and MMS Technology. NCLs Provato is an SMS/MMS Gateway supporting  WAP Push, EMS, MMS, SMS, Nokia Smart Messaging, SMPP, CIMD, UCP, MM7, M20, TC35 NCL Technologies Ltd
Provato - SMS MMS Gateway
Mobile Messaging in J2EE & .NET

SwiftNote - Java SMS Toolkit