oracle.panama.messaging.push
Class AddressData

java.lang.Object
  |
  +--oracle.panama.messaging.push.AddressData
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
EmailAddressData, PhoneAddressData, UserAddressData, WAPPushAddressData

public class AddressData
extends java.lang.Object
implements java.lang.Cloneable

AddressData represents a generic address. It's the common base class for all types of addresses used in Push service. AddressData provides a holder to keep all kinds of addresses. (i.e. email and phone number)
PhoneAddressData and EmailAddressData are two sub classes of AddressData which represent phone number and email address respectively.
Note:
Never access any public data fields inside this class directly, because they are for internal use in this release and will be changed in coming releases. Always use public methods of this class.


Field Summary
TypeField
 java.lang.String address
           
 java.lang.String encoding
           
 AddressData failoverAddress
           
 java.lang.String key
           
 
Constructor Summary
AddressData()
          Constructor to construct an empty address
AddressData(java.lang.String address)
          Constructor Construct an AddressData object with given address string
 
Method Summary
TypeMethod
 java.lang.Object clone()
           
 java.lang.String getAddress()
          get address string
 java.lang.String getAddressType()
          Get address type string.
 java.lang.String getAssociatedKey()
          get the key string of the address instance.
 java.lang.String getEncoding()
          get the charset encoding for the device of this address.
 AddressData getFailoverAddress()
          return the failover address (if any).
 void setAddress(java.lang.String address)
          Set address string
 void setAddressType(java.lang.String addressType)
          Set address type string.
 void setAssociatedKey(java.lang.String key)
          The application may set a key which may create a mapping to the application database table.
 void setEncoding(java.lang.String encoding)
          Set the charset encoding for device of this address.
 void setFailoverAddress(AddressData addr)
          Sets failover address.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

address

public java.lang.String address

key

public java.lang.String key

encoding

public java.lang.String encoding

failoverAddress

public AddressData failoverAddress
Constructor Detail

AddressData

public AddressData()
Constructor to construct an empty address

AddressData

public AddressData(java.lang.String address)
Constructor Construct an AddressData object with given address string
Parameters:
address - address string
Method Detail

setAddress

public void setAddress(java.lang.String address)
Set address string

getAddress

public java.lang.String getAddress()
get address string

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException

setFailoverAddress

public void setFailoverAddress(AddressData addr)
Sets failover address. Failover address is going to be used if system can't deliver the message to current address. For example: The home phone number could be failover address of the office phone. Home phone number will be called if and only if the call to office number is not successful.

getFailoverAddress

public AddressData getFailoverAddress()
return the failover address (if any). null for no failover address.

getAddressType

public java.lang.String getAddressType()
Get address type string. A subclass of AddressDate may override this function to return a string to identify itself.

setAddressType

public void setAddressType(java.lang.String addressType)
Set address type string.

setAssociatedKey

public void setAssociatedKey(java.lang.String key)
The application may set a key which may create a mapping to the application database table. AddressData will carry it but Messaging engine/gateway won't interpret it. For example: An application may put the primary key of its address table or user table here so that it can locate the db record from an AddressData instance easily.

getAssociatedKey

public java.lang.String getAssociatedKey()
get the key string of the address instance.

setEncoding

public void setEncoding(java.lang.String encoding)
Set the charset encoding for device of this address.

getEncoding

public java.lang.String getEncoding()
get the charset encoding for the device of this address.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object