|
Oracle Communications Converged Application Server Java API Reference 5.1 E36938-01 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ReferPolicy
ReferPolicy interface is used by application to get the detailed information for CommunicationEvent.Type.REFER event and do the authorization by implement method annotated with this event in CommunicationBean, application can also set the correct refer-by value in this method.
The usage as following:
@CommunicationEvent(type = CommunicationEvent.Type.REFER)
void handleRefer() {
ReferPolicy referPolicy = ctx.getContextElement(ReferPolicy.class);
String sender = referPolicy.getSender();
String recipient = referPolicy.getRecipient();
String referredBy = referPolicy.getReferredBy();
String referTo = referPolicy.getReferTo();
String referToMethod = referPolicy.getReferToMethod();
// application can set correctly referred-by header in this event.
if (referredBy == null) {
IdentityInformation identityInfo =
ctx.getContextElement(IdentityInformation.class);
if (identityInfo != null) {
String pAssertedIdentity = identityInfo.getAssertedIdentity();
referPolicy.setReferredBy(pAssertedIdentity);
}
}
// an example of authorization
if (sender.equals("conf1@example.com")) {
referPolicy.reject(Reason.DECLINE);
}
}
ReferPolicy| Method Summary | |
|---|---|
String |
getEarlyFlag()Return the early-flag value. |
String |
getRecipient()Returns the recipient name. |
String |
getReferredBy()Returns the value of Referred-By header. |
String |
getReferTo()Returns the refer to user name. |
String |
getReferToMethod()Returns the method parameter in Refer-To header. |
String |
getSender()Returns the sender name. |
boolean |
referToIncludeReplaces()If the Refer-To header includes Replaces parameter, invoke this method will returns true, otherwise returns false. |
void |
reject()Reject the participant that referring to SFT. |
void |
reject(Reason reason)Reject the participant that referring to SFT. |
void |
setReferredBy(String name)Set the Referred-By header with the specified value. |
| Methods inherited from interface com.oracle.sft.api.ContextElement |
|---|
isUpdatable |
| Method Detail |
|---|
String getSender()
String getRecipient()
String getReferTo()
String getReferToMethod()
String getReferredBy()
void setReferredBy(String name)
boolean referToIncludeReplaces()
String getEarlyFlag()
void reject()
void reject(Reason reason)
reason - Reason for rejecting the participant.
|
Oracle Communications Converged Application Server Java API Reference 5.1 E36938-01 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright © 2012 Oracle Corporation. All Rights Reserved.