本文整理了Java中javax.slee.Address.<init>()
方法的一些代码示例,展示了Address.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Address.<init>()
方法的具体详情如下:
包路径:javax.slee.Address
类名称:Address
方法名:<init>
暂无
代码示例来源:origin: org.mobicents.servers.jainslee.core/jmx-property-editors
public void setAsText(String text) throws IllegalArgumentException {
try {
int delimerSize = 2;
int delimiter = text.indexOf(": ");
if (delimiter == -1) {
delimerSize = 1;
delimiter = text.indexOf(":");
}
if (delimiter == -1) {
throw new IllegalArgumentException("text arg should be \"address plan as string\" + \": \" + \"address as string\"");
}
String addressPlan = text.substring(0,delimiter);
String address = text.substring(delimiter+delimerSize);
this.setValue(new Address(AddressPlan.fromString(addressPlan),address));
} catch (Throwable ex) {
throw new IllegalArgumentException(ex.getMessage(),ex);
}
}
代码示例来源:origin: org.mobicents.servers.jainslee.core/profiles
/**
*
* @param profileEntityAfterAction
*/
AbstractProfileEvent(ProfileEntity profileEntityAfterAction, ProfileManagementImpl profileManagement) {
this.profileManagement = profileManagement;
this.profileAfterAction = profileEntityAfterAction;
this.profileAddress = new Address(AddressPlan.SLEE_PROFILE, profileEntityAfterAction.getTableName() + "/"
+ profileEntityAfterAction.getProfileName());
this.profileID = new ProfileID(this.profileAddress);
}
代码示例来源:origin: org.mobicents.examples/call-controller2-profile
Address[] blockedAddresses = {new Address(AddressPlan.SIP, "sip:restcomm@"+domain),new Address(AddressPlan.SIP, "sip:hugo@"+domain)};
newProfile(adaptor,sci,profileTableName, "torosvi", "sip:torosvi@"+domain, blockedAddresses, null, true, user,password);
log.info("********** CREATED PROFILE: torosvi **********");
log.info("********** CREATED PROFILE: mobicents **********");
Address backupAddress = new Address(AddressPlan.SIP, "sip:torosvi@"+domain);
newProfile(adaptor,sci,profileTableName, "victor", "sip:victor@"+domain, null, backupAddress, false,user,password);
log.info("********** CREATED PROFILE: victor **********");
代码示例来源:origin: org.mobicents.examples/call-controller2-sbbs
/**
* To know whether or not the called user has the Voice Mail service
* enabled.
*
* @param sipAddress
* : Called user address.
* @return boolean: TRUE -> Voice Mail enabled. FALSE -> Voice Mail disabled
* for the given user identified by sip address.
*/
private boolean isSubscriber(String sipAddress) {
boolean state = false;
CallControlProfileCMP profile = lookup(new Address(AddressPlan.SIP,
sipAddress));
log.info("Retrieved CallControllProfile["+(profile!=null)+"] for user: "+sipAddress);
if (profile != null) {
state = profile.getVoicemailState();
}
return state;
}
代码示例来源:origin: org.mobicents.examples/call-controller2-forwarding-sbb
/**
* Attempt to find a Backup Address, but the method returns null if there
* isn't any address to forward the INVITE.
*/
private Address getBackupAddress(String sipAddress) {
Address backupAddress = null;
CallControlProfileCMP profile = this.lookup(new javax.slee.Address(
AddressPlan.SIP, sipAddress));
if (profile != null) {
javax.slee.Address address = profile.getBackupAddress();
if (address != null) {
try {
backupAddress = getAddressFactory().createAddress(
address.getAddressString());
} catch (ParseException e) {
log.error(e.getMessage(), e);
}
}
}
return backupAddress;
}
代码示例来源:origin: org.mobicents.examples/call-controller2-sbbs
/**
* Attempt to find a list of Blocked Addresses (SIP URIs), but the method
* returns null if the called user (sipAddress) does not block to any user.
*/
private ArrayList getBlockedArrayList(String sipAddress) {
//sipAddress is AOR: sip:newbie@restcomm.com
ArrayList uris = null;
CallControlProfileCMP profile = super.lookup(new Address(AddressPlan.SIP,
sipAddress));
if (profile != null) {
Address[] addresses = profile.getBlockedAddresses();
if (addresses != null) {
uris = new ArrayList(addresses.length);
for (int i = 0; i < addresses.length; i++) {
String address = addresses[i].getAddressString();
try {
SipURI uri = (SipURI) getAddressFactory().createURI(address);
uris.add(uri);
} catch (ParseException e) {
log.severe(e.getMessage(), e);
}
}
}
}
return uris;
}
代码示例来源:origin: org.mobicents.resources/asterisk-ra
address = new Address(AddressPlan.IP, this.MAGIIP );
代码示例来源:origin: org.mobicents.examples/call-controller2-sbbs
/**
* Attempt to find a Backup Address, but the method returns null if there
* isn't any address to forward the INVITE.
*/
private Address getBackupAddress(String sipAddress) {
Address backupAddress = null;
CallControlProfileCMP profile = this.lookup(new javax.slee.Address(AddressPlan.SIP, sipAddress));
if (profile != null) {
javax.slee.Address address = profile.getBackupAddress();
if (address != null) {
try {
backupAddress = getAddressFactory().createAddress(address.getAddressString());
} catch (ParseException e) {
log.severe(e.getMessage(), e);
}
}
}
return backupAddress;
}
代码示例来源:origin: org.mobicents.resources/restcomm-slee-ra-tftp-server-ra
protected void fireEvent(RequestEvent event, TransferActivity activity, String address)
throws UnrecognizedActivityHandleException, IllegalEventException,
ActivityIsEndingException, NullPointerException, SLEEException, FireEventException {
if (trc.isFineEnabled())
trc.fine("About to fire event " + EventIDCache.getEventName(event));
FireableEventType eventType = eventIdCache.getEventType(eventLookup, event);
sleeEndpoint.fireEvent(getActivityHandle(activity), eventType, event,
new javax.slee.Address(AddressPlan.IP, address), null);
}
代码示例来源:origin: org.mobicents.examples/call-controller2-profile
Address userAddress = new Address(AddressPlan.SIP, callee);
Attribute userAttr = new Attribute("UserAddress", userAddress);
Attribute blockedAttr = new Attribute("BlockedAddresses", block);
代码示例来源:origin: org.mobicents.resources/mobicents-slee-ra-tftp-server-ra
protected void fireEvent(RequestEvent event, TransferActivity activity, String address)
throws UnrecognizedActivityHandleException, IllegalEventException,
ActivityIsEndingException, NullPointerException, SLEEException, FireEventException {
if (trc.isFineEnabled())
trc.fine("About to fire event " + EventIDCache.getEventName(event));
FireableEventType eventType = eventIdCache.getEventType(eventLookup, event);
sleeEndpoint.fireEvent(getActivityHandle(activity), eventType, event,
new javax.slee.Address(AddressPlan.IP, address), null);
}
代码示例来源:origin: org.mobicents.core/mobicents-core-jar
Address profileAddress = new Address(AddressPlan.SLEE_PROFILE,
profileTableName + "/" + profileName);
ProfileTableActivityImpl profileTableActivity = this
代码示例来源:origin: org.mobicents.core/mobicents-core-jar
Address profileAddress = new Address(AddressPlan.SLEE_PROFILE,
profileTableName + "/" + profileName);
ProfileTableActivityContextInterfaceFactoryImpl profileTableActivityContextInterfaceFactory;
代码示例来源:origin: org.mobicents.resources/smpp-ra
protected void fireEvent(String eventName, Object activity, SmppEvent event) {
final ActivityHandle handle = this.getActivityHandle(activity);
final FireableEventType eventType = eventTypeCache.getEventType(eventLookup, eventName);
if (eventTypeFilter.filterEvent(eventType)) {
if (tracer.isFineEnabled()) {
tracer.fine("event " + eventName + " filtered");
}
return;
}
final Address address = new Address(AddressPlan.E164_MOBILE, event.getMessage().getOriginator());
try {
sleeEndpoint.fireEvent(handle, eventType, event, address, null, EVENT_FLAGS);
if (tracer.isInfoEnabled()) {
tracer.info("Fired event: " + eventName);
}
} catch (Throwable e) {
tracer.severe("Failed to fire event", e);
}
}
代码示例来源:origin: org.mobicents.resources/smpp5-ra
protected void fireEvent(String eventName, SmppTransactionImpl activity, Object event) {
final ActivityHandle handle = this.getActivityHandle(activity);
if (handle == null) {
this.tracer.warning("Firing event " + eventName + " for null ActivityHandle Activity=" + activity);
return;
}
final FireableEventType eventType = eventTypeCache.getEventType(eventLookup, eventName);
if (eventTypeFilter.filterEvent(eventType)) {
if (tracer.isFineEnabled()) {
tracer.fine("event " + eventName + " filtered");
}
return;
}
final String addressStr = this.utils.getAddressForEventFire(activity.getSmppRequest());
final Address address = new Address(AddressPlan.E164_MOBILE, addressStr);
try {
sleeEndpoint.fireEvent(handle, eventType, event, address, null);
if (tracer.isInfoEnabled()) {
tracer.info("Fired event: " + eventName);
}
} catch (Throwable e) {
tracer.severe("Failed to fire event", e);
}
}
内容来源于网络,如有侵权,请联系作者删除!