|
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 SubscriptionPolicy
SubscriptionPolicy interface is used by application to get the detailed information for CommunicationEvent.Type.SUBSCRIPTION event and do the authorization by implement method annotated with this event in CommunicationBean.
The usage as following:
@CommunicationEvent(type = CommunicationEvent.Type.SUBSCRIPTION)
void handleSubscription() {
SubscriptionPolicy subsPolicy = ctx.getContextElement(SubscriptionPolicy.class);
String resourceId = subsPolicy.getResourceId();
String subscriber = subsPolicy.getSubscriber();
// An example of authorization,
// forbid alice's subscription to resource conf1@example.com.
if (subscriber.equals("alice@example.com")) {
if (resourceId.equals("conf1@example.com")) {
subsPolicy.reject();
}
}
}
SubscriptionPolicy| Method Summary | |
|---|---|
EventPackageName |
getEventName()Return the Event name. |
String |
getResourceId()Returns the resource id that the subscriber subscribe to. |
String |
getSubscriber()Get the subscriber name. |
void |
reject()Reject the participant that referring to SFT. |
| Methods inherited from interface com.oracle.sft.api.ContextElement |
|---|
isUpdatable |
| Method Detail |
|---|
String getSubscriber()
String getResourceId()
EventPackageName getEventName()
void reject()
|
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.