Oracle Application Server Wireless Java API Reference
B14043-01


oracle.panama.messaging.push
Class AddressData

java.lang.Object
  extended byoracle.panama.messaging.push.AddressData

All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable
Direct Known Subclasses:
DeviceAddressData, UserAddressData

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

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. (e.g. email and phone number)
PhoneAddressData and EmailAddressData are two sub classes of AddressData which represent phone number and email address respectively.
Another subclass, UserAddressData, represents a generic user. A user could be an iAS Wireless user or any third party user. Only user name and its scope is specified in the class. Push Server will get all attributes of the user (e.g. email addresses and phone numbers) from user's profile.
Some devices can receive messages via many transport types. For example: a cell phone may be able to receive voice message, email and SMS. PrimaryTransportType is the transport type to be used in the first delivery attempt. It's a required field for all email and phone recipients.
If a device supports other transports, these transport types may be used as failover transport types. Use setFailoverTransportTypes() to set failover transport types. A device may have another device as failover device. If all transport types of the device have been tried and failed, Push server will use failover device to make further attempts.

Failover order: Push server will be trying to deliver message in the following order:
Try primary transport type first.
Try failover transport types at the order provided.
Failover to another device.

Note:
1. 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.
2. Constructors of this class may not be invoked by end users directly, because this is the base class of all AddressData classes. Please instantiate appropriate subclasses of DeviceAddressData or UserAddressData.

See Also:
Serialized Form

Field Summary
int failoverOrder
static int MAX_ADDRESS_LENGTH
static int MAX_ASSOCIATED_KEY_LENGTH
static int MAX_NAME_LENGTH
static int MAX_TRANSPORT_TYPE_LENGTH
int totalFailovers

Method Summary
java.lang.Object clone()
boolean equals(java.lang.Object other)
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).
DeliveryChannel[] getFailoverDeliveryChannels()
get failover delivery channels set by setFailoverDeliveryChannel
java.lang.String[] getFailoverTransportTypes()
get failover transport type of this device.
java.lang.String getFirstName()
Get the first name of the recipient of the address
java.lang.String getLastName()
Get the first name of the recipient of the address
DeliveryChannel getPrimaryDeliveryChannel()
getPrimaryDeliveryChannel get the primary (first) delivery channel of this address.
java.lang.String getPrimaryTransportType()
get primary transport type of this address.
int hashCode()
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.
void setFailoverDeliveryChannels(DeliveryChannel[] failoverChannels)
set failover delivery channels of an address.
void setFailoverTransportTypes(java.lang.String[] failoverTransportTypes)
Specify the order of transport types to be used in the same device, if former delivery attempts failed.
void setFirstName(java.lang.String first)
Set the first name of the recipient of the address
void setLastName(java.lang.String last)
Set the last name of the recipient of the address
void setPrimaryDeliveryChannel(DeliveryChannel primaryChannel)
setPrimaryDeliveryChannel sets primary delivery channel for this address.
void setPrimaryTransportType(java.lang.String primaryTransportType)
Set the first delivery type to be used to deliver the message.
java.lang.String toString()

Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait

Field Detail

failoverOrder

public int failoverOrder

MAX_ADDRESS_LENGTH

public static final int MAX_ADDRESS_LENGTH
See Also:
Constant Field Values

MAX_ASSOCIATED_KEY_LENGTH

public static final int MAX_ASSOCIATED_KEY_LENGTH
See Also:
Constant Field Values

MAX_NAME_LENGTH

public static final int MAX_NAME_LENGTH
See Also:
Constant Field Values

MAX_TRANSPORT_TYPE_LENGTH

public static final int MAX_TRANSPORT_TYPE_LENGTH
See Also:
Constant Field Values

totalFailovers

public int totalFailovers

Method Detail

clone

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

equals

public boolean equals(java.lang.Object other)

getAddress

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

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.

getAssociatedKey

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

getEncoding

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

getFailoverAddress

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

getFailoverDeliveryChannels

public DeliveryChannel[] getFailoverDeliveryChannels()
get failover delivery channels set by setFailoverDeliveryChannel

getFailoverTransportTypes

public java.lang.String[] getFailoverTransportTypes()
get failover transport type of this device.

getFirstName

public java.lang.String getFirstName()
Get the first name of the recipient of the address

getLastName

public java.lang.String getLastName()
Get the first name of the recipient of the address

getPrimaryDeliveryChannel

public DeliveryChannel getPrimaryDeliveryChannel()
getPrimaryDeliveryChannel get the primary (first) delivery channel of this address.

getPrimaryTransportType

public java.lang.String getPrimaryTransportType()
get primary transport type of this address.

hashCode

public int hashCode()

setAddress

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

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.

setEncoding

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

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.

setFailoverDeliveryChannels

public void setFailoverDeliveryChannels(DeliveryChannel[] failoverChannels)
set failover delivery channels of an address. Failover delivery channels will be used in the order they appearing in the list to deliver the message to this address if primary delivery channel failed or timeout until the message has been delivered to a delivery channel. DeliveryChannel is extended from transport type to provide addtional information and constrains of the transport type. Failover transport types and failover delivery channels are sharing the same storage. Failover transport types are failover delivery channels with only transport type parameter being set per channel. The last call of setFailoverTransportTypes() and setFailoverDeliveryChannels() prevails.

setFailoverTransportTypes

public void setFailoverTransportTypes(java.lang.String[] failoverTransportTypes)
Specify the order of transport types to be used in the same device, if former delivery attempts failed. DeliveryChannel is extended from transport type to provide addtional information and constrains of the transport type. Failover transport types and failover delivery channels are sharing the same storage. Failover transport types are failover delivery channels with only transport type parameter being set per channel. The last call of setFailoverTransportTypes() and setFailoverDeliveryChannels() prevails.

setFirstName

public void setFirstName(java.lang.String first)
Set the first name of the recipient of the address

setLastName

public void setLastName(java.lang.String last)
Set the last name of the recipient of the address

setPrimaryDeliveryChannel

public void setPrimaryDeliveryChannel(DeliveryChannel primaryChannel)
setPrimaryDeliveryChannel sets primary delivery channel for this address. One delivery channel has one transport type (delivery type) and other attributes like timeout parameter. primary delivery channel is the first delivery channel which will be used when sending the message to this address. Either primary transport type or primary delivery channel must be set for all physical addresses like email or phone. DeliveryChannel is extended from transport type to provide addtional information and constrains of the transport type. Primary transport type and primary delivery channel are sharing the same storage. Primary transport type is primary delivery channel with only transport type parameter being set. The last call of setPrimaryTransportType() and setPrimaryDeliveryChannel() prevails. Same story for failover transport types and failover delivery channels.

setPrimaryTransportType

public void setPrimaryTransportType(java.lang.String primaryTransportType)
Set the first delivery type to be used to deliver the message. Primary transport type or primary delivery channel must be set for all physical addresses like email or phone. DeliveryChannel is extended from transport type to provide addtional information and constrains of the transport type. Primary transport type and primary delivery channel are sharing the same storage. Primary transport type is primary delivery channel with only transport type parameter being set. The last call of setPrimaryTransportType() and setPrimaryDeliveryChannel() prevails. Same story for failover transport types and failover delivery channels.

toString

public java.lang.String toString()

Oracle Application Server Wireless Java API Reference
B14043-01


Copyright © 2004 Oracle Corporation. All Rights Reserved.