⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 corbaserver.java

📁 jtapi for telephone
💻 JAVA
📖 第 1 页 / 共 3 页
字号:
 * Create a Corba ResourceUnavailableEx from its pair
 * Creation date: (2000-08-24 18:34:19)
 * @author: Richard Deadman
 * @return net.sourceforge.gjtapi.raw.remote.corba.ResourceUnavailableEx
 * @param rue javax.telephony.ResourceUnavailableException
 */
private ResourceUnavailableEx createResourceUnavailableEx(javax.telephony.ResourceUnavailableException rue) {
	return new ResourceUnavailableEx(rue.getType(), rue.getMessage());
}
/**
 * Clean up when no longer held by anything.
 * Creation date: (2000-08-25 1:45:07)
 * @author: Richard Deadman
 */
public void finalize() {
	this.getReal().shutdown();
}
/**
 * freeMedia method comment.
 */
public boolean freeMedia(String terminal, int type) {
	return this.getReal().freeMedia(terminal, type);
}
/**
 * getAddresses method comment.
 */
public java.lang.String[] getAddresses() throws net.sourceforge.gjtapi.raw.remote.corba.ResourceUnavailableEx {
	try {
		return this.getReal().getAddresses();
	} catch (javax.telephony.ResourceUnavailableException rue) {
		throw this.createResourceUnavailableEx(rue);
	}
}
/**
 * getAddressesForTerm method comment.
 */
public java.lang.String[] getAddressesForTerm(String terminal) throws net.sourceforge.gjtapi.raw.remote.corba.InvalidArgumentEx {
	try {
		return this.getReal().getAddresses(terminal);
	} catch (InvalidArgumentException iae) {
		throw this.createInvalidArgumentEx(iae);
	}
}
/**
 * getAddressType method comment.
 */
public int getAddressType(String name) {
	return this.getReal().getAddressType(name);
}
/**
 * getCall method comment.
 */
public net.sourceforge.gjtapi.raw.remote.corba.CallData getCall(int callId) {
	return this.toCallData(this.getReal().getCall(this.getRefMapper().intToCall(callId)));
}
/**
 * Insert the method's description here.
 * Creation date: (2000-08-24 15:33:55)
 * @author: Richard Deadman
 * @return net.sourceforge.gjtapi.raw.RawListenerMux
 */
private net.sourceforge.gjtapi.raw.RawListenerMux getCallbackMux() {
	return callbackMux;
}
/**
 * getCallsOnAddress method comment.
 */
public net.sourceforge.gjtapi.raw.remote.corba.CallData[] getCallsOnAddress(String address) {
	return this.convertCallArray(this.getReal().getCallsOnAddress(address));
}
/**
 * getCallsOnTerminal method comment.
 */
public net.sourceforge.gjtapi.raw.remote.corba.CallData[] getCallsOnTerminal(String terminal) {
	return this.convertCallArray(this.getReal().getCallsOnTerminal(terminal));
}
/**
 * getCapabilities method comment.
 */
public net.sourceforge.gjtapi.raw.remote.corba.StringEntry[] getCapabilities() {
	Properties props = this.getReal().getCapabilities();
	StringEntry[] sEntries = new StringEntry[props.size()];
	int i = 0;
	Enumeration e = props.keys();
	while (e.hasMoreElements()) {
		Object key = e.nextElement();
		sEntries[i] = new StringEntry((String)key, (String)props.get(key));
		i++;
	}
	return sEntries;
}
/**
 * getDialledDigits method comment.
 */
public java.lang.String getDialledDigits(int id, String address) {
	return this.getReal().getDialledDigits(this.getRefMapper().intToCall(id), address);
}
/**
 * Return the ORB that is handling my remoteness.
 * Creation date: (2000-08-24 15:54:40)
 * @author: Richard Deadman
 * @return org.omg.CORBA.ORB
 */
private org.omg.CORBA.ORB getOrb() {
	return orb;
}
/**
 * getPrivateData method comment.
 */
public org.omg.CORBA.Any getPrivateData(int callId, String address, String terminal) throws net.sourceforge.gjtapi.raw.remote.corba.NotSerializableEx {
	Object res = this.getReal().getPrivateData(this.getRefMapper().intToCall(callId), address, terminal);
	try {
		return CorbaProvider.convertToAny(this.getOrb(), res);
	} catch (java.io.NotSerializableException nse) {
		throw new NotSerializableEx(nse.getMessage());
	}
}
/**
 * Internal accessor for the real TelephonyProvider I am making remote.
 * Creation date: (2000-08-24 15:33:56)
 * @author: Richard Deadman
 * @return net.sourceforge.gjtapi.TelephonyProvider
 */
private net.sourceforge.gjtapi.TelephonyProvider getReal() {
	return real;
}
/**
 * This maps TelephonyProvider callIds to SerializableCallIds that have an integer id that is passed
 * to the remote client.
 * Creation date: (2000-08-24 15:33:56)
 * @author: Richard Deadman
 * @return net.sourceforge.gjtapi.raw.remote.CallMapper
 */
private CallMapper getRefMapper() {
	return refMapper;
}
/**
 * getTerminals method comment.
 */
public net.sourceforge.gjtapi.raw.remote.corba.TermData[] getTerminals() throws net.sourceforge.gjtapi.raw.remote.corba.ResourceUnavailableEx {
	try {
		return this.convertTermDataArray(this.getReal().getTerminals());
	} catch (javax.telephony.ResourceUnavailableException rue) {
		throw createResourceUnavailableEx(rue);
	}
}
/**
 * getTerminalsForAddr method comment.
 */
public net.sourceforge.gjtapi.raw.remote.corba.TermData[] getTerminalsForAddr(String address) throws net.sourceforge.gjtapi.raw.remote.corba.InvalidArgumentEx {
	try {
		return this.convertTermDataArray(this.getReal().getTerminals(address));
	} catch (InvalidArgumentException iae) {
		throw this.createInvalidArgumentEx(iae);
	}
}
/**
 * hold method comment.
 */
public void hold(int callId, String address, String terminal) throws net.sourceforge.gjtapi.raw.remote.corba.ResourceUnavailableEx, net.sourceforge.gjtapi.raw.remote.corba.PrivilegeViolationEx, net.sourceforge.gjtapi.raw.remote.corba.RawStateEx, net.sourceforge.gjtapi.raw.remote.corba.MethodNotSupportedEx {
	try {
		this.getReal().hold(this.getRefMapper().intToCall(callId), address, terminal);
	} catch (PrivilegeViolationException pve) {
		throw this.createPrivilegeViolationEx(pve);
	} catch (javax.telephony.ResourceUnavailableException rue) {
		throw this.createResourceUnavailableEx(rue);
	} catch (MethodNotSupportedException mnse) {
		throw this.createMethodNotSupportedEx(mnse);
	} catch (RawStateException rse) {
		throw this.createRawStateEx(rse);
	}
}
/**
 * initialize method comment.
 */
public void initialize(net.sourceforge.gjtapi.raw.remote.corba.StringEntry[] propArray) throws net.sourceforge.gjtapi.raw.remote.corba.ProviderUnavailableEx {
	Properties props = new Properties();
	int size = propArray.length;
	for (int i = 0; i < size; i++) {
		props.put(propArray[i].key, propArray[i].value);
	}
	this.getReal().initialize(props);
}
/**
 * isMediaTerminal method comment.
 */
public boolean isMediaTerminal(String terminal) {
	return this.getReal().isMediaTerminal(terminal);
}
/**
 * join method comment.
 */
public int join(int callId1, int callId2, String address, String terminal) throws net.sourceforge.gjtapi.raw.remote.corba.ResourceUnavailableEx, net.sourceforge.gjtapi.raw.remote.corba.PrivilegeViolationEx, net.sourceforge.gjtapi.raw.remote.corba.InvalidArgumentEx, net.sourceforge.gjtapi.raw.remote.corba.RawStateEx, net.sourceforge.gjtapi.raw.remote.corba.MethodNotSupportedEx {
	CallMapper cm = this.getRefMapper();
	try {
		return cm.callToInt(this.getReal().join(cm.intToCall(callId1),
				cm.intToCall(callId2),
				address,
				terminal));
	} catch (javax.telephony.ResourceUnavailableException rue) {
		throw this.createResourceUnavailableEx(rue);
	} catch (PrivilegeViolationException pve) {
		throw createPrivilegeViolationEx(pve);
	} catch (RawStateException rse) {
		throw createRawStateEx(rse);
	} catch (MethodNotSupportedException nse) {
		throw createMethodNotSupportedEx(nse);
	} catch (InvalidArgumentException iae) {
		throw createInvalidArgumentEx(iae);
	}
}
/**
 * play method comment.
 */
public void play(String terminal, java.lang.String[] streamIds, int offset, net.sourceforge.gjtapi.raw.remote.corba.LongEntry[] rtcs, net.sourceforge.gjtapi.raw.remote.corba.LongEntry[] optArgs) throws net.sourceforge.gjtapi.raw.remote.corba.MediaResourceEx {
	try {
		this.getReal().play(terminal, streamIds, offset, this.toRTCArray(rtcs), this.toSymbolDictionary(optArgs));
	} catch (MediaResourceException mre) {
		throw new MediaResourceEx(mre.getMessage(),
			this.createEvent(mre.getResourceEvent()));
	}
}
/**
 * record method comment.
 */
public void record(String terminal, String streamId, net.sourceforge.gjtapi.raw.remote.corba.LongEntry[] rtcs, net.sourceforge.gjtapi.raw.remote.corba.LongEntry[] optArgs) throws net.sourceforge.gjtapi.raw.remote.corba.MediaResourceEx {
	try {
		this.getReal().record(terminal, streamId, this.toRTCArray(rtcs), this.toSymbolDictionary(optArgs));
	} catch (MediaResourceException mre) {
		throw new MediaResourceEx(mre.getMessage(),
			this.createEvent(mre.getResourceEvent()));
	}
}
/**
 * release method comment.
 */
public void release(String address, int callId) throws net.sourceforge.gjtapi.raw.remote.corba.ResourceUnavailableEx, net.sourceforge.gjtapi.raw.remote.corba.PrivilegeViolationEx, net.sourceforge.gjtapi.raw.remote.corba.RawStateEx, net.sourceforge.gjtapi.raw.remote.corba.MethodNotSupportedEx {
	try {
		this.getReal().release(address, this.getRefMapper().intToCall(callId));
	} catch (javax.telephony.ResourceUnavailableException rue) {
		throw createResourceUnavailableEx(rue);
	} catch (PrivilegeViolationException pve) {
		throw createPrivilegeViolationEx(pve);
	} catch (RawStateException rse) {
		throw createRawStateEx(rse);
	} catch (MethodNotSupportedException nse) {
		throw createMethodNotSupportedEx(nse);
	}
}
/**
 * releaseCallId method comment.
 */
public void releaseCallId(int callId) {
	this.getReal().releaseCallId(this.getRefMapper().intToCall(callId));
}
/**
 * removeListener method comment.
 */
public void removeListener(net.sourceforge.gjtapi.raw.remote.corba.CorbaListener cl) {
	this.getCallbackMux().removeListener(new CorbaListenerWrapper(cl, this.getRefMapper(), this.getOrb()));
}
/**
 * reportCallsOnAddress method comment.
 */
public void reportCallsOnAddress(String address, boolean flag) throws net.sourceforge.gjtapi.raw.remote.corba.ResourceUnavailableEx, net.sourceforge.gjtapi.raw.remote.corba.InvalidArgumentEx {
	try {

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -