📄 provider.java
字号:
int size = callListeners.size();
if (size > 0) {
FreeCall fCall = call.getFrameCall();
Iterator it = callListeners.values().iterator();
while (it.hasNext()) {
CallListenerAdapter cl = (CallListenerAdapter)it.next();
cl.callCreated(new CreatedCallEvent(call));
fCall.addCallListener(cl);
}
}
// return the call
return call;
}
/**
* createEventFilterAddressRange method comment.
*/
public EventFilter createEventFilterAddressRange(String lowAddress, String highAddress, int matchDisposition, int nomatchDisposition) throws javax.csapi.cc.jcc.ResourceUnavailableException {
try {
return new net.sourceforge.gjtapi.jcc.filter.AddressRangeFilter(this.getAddress(lowAddress), this.getAddress(highAddress), matchDisposition, nomatchDisposition);
} catch (javax.csapi.cc.jcc.InvalidPartyException iae) {
throw new javax.csapi.cc.jcc.ResourceUnavailableException(javax.csapi.cc.jcc.ResourceUnavailableException.ORIGINATOR_UNAVAILABLE);
}
}
/**
* Create a filter that uses a regular expression to look for matches.
*/
public EventFilter createEventFilterAddressRegEx(java.lang.String addressRE, int matchDisposition, int nomatchDisposition) {
return new net.sourceforge.gjtapi.jcc.filter.AddressREFilter(addressRE, matchDisposition, nomatchDisposition);
}
/**
* createEventFilterAnd method comment.
*/
public EventFilter createEventFilterAnd(EventFilter[] filters, int nomatchDisposition) {
return new net.sourceforge.gjtapi.jcc.filter.AndFilter(filters, nomatchDisposition);
}
/**
* createEventFilterAddressRange method comment.
*/
public EventFilter createEventFilterDestAddressRange(String lowAddress, String highAddress, int matchDisposition, int nomatchDisposition) throws javax.csapi.cc.jcc.ResourceUnavailableException {
try {
return new net.sourceforge.gjtapi.jcc.filter.DestAddressRangeFilter(this.getAddress(lowAddress), this.getAddress(highAddress), matchDisposition, nomatchDisposition);
} catch (javax.csapi.cc.jcc.InvalidPartyException iae) {
throw new javax.csapi.cc.jcc.ResourceUnavailableException(javax.csapi.cc.jcc.ResourceUnavailableException.ORIGINATOR_UNAVAILABLE);
}
}
/**
* Create a filter that uses a regular expression to look for matches.
*/
public EventFilter createEventFilterDestAddressRegEx(java.lang.String addressRE, int matchDisposition, int nomatchDisposition) {
return new net.sourceforge.gjtapi.jcc.filter.DestAddressREFilter(addressRE, matchDisposition, nomatchDisposition);
}
/**
* createEventFilterEventSet method comment.
*/
public EventFilter createEventFilterEventSet(int[] blockEvents, int[] notifyEvents) {
return new net.sourceforge.gjtapi.jcc.filter.EventSetFilter(blockEvents, notifyEvents);
}
/**
* createEventFilterOr method comment.
*/
public EventFilter createEventFilterOr(EventFilter[] filters, int nomatchDisposition) {
return new net.sourceforge.gjtapi.jcc.filter.OrFilter(filters, nomatchDisposition);
}
/**
* createEventFilterAddressRange method comment.
*/
public EventFilter createEventFilterOrigAddressRange(String lowAddress, String highAddress, int matchDisposition, int nomatchDisposition) throws javax.csapi.cc.jcc.ResourceUnavailableException {
try {
return new net.sourceforge.gjtapi.jcc.filter.OrigAddressRangeFilter(this.getAddress(lowAddress), this.getAddress(highAddress), matchDisposition, nomatchDisposition);
} catch (javax.csapi.cc.jcc.InvalidPartyException iae) {
throw new javax.csapi.cc.jcc.ResourceUnavailableException(javax.csapi.cc.jcc.ResourceUnavailableException.ORIGINATOR_UNAVAILABLE);
}
}
/**
* Create a filter that uses a regular expression to look for matches.
*/
public EventFilter createEventFilterOrigAddressRegEx(java.lang.String addressRE, int matchDisposition, int nomatchDisposition) {
return new net.sourceforge.gjtapi.jcc.filter.OrigAddressREFilter(addressRE, matchDisposition, nomatchDisposition);
}
/**
This method returns a standard EventFilter which is implemented by the JCC platform.
For all events that require filtering by this {@link EventFilter}, apply the following:
<ul>
<li>If the cause code is matched, the filter returns the value matchDisposition.
<li>If the cause code is not matched, then return nomatchDisposition.
</ul>
@param causeCode an integer that represents a cause code. Valid cause codes (prefixed by
<code>CAUSE_</code>) are defined in {@link JcpEvent} and {@link JccCallEvent}.
@param matchDisposition indicates the disposition of a JCC related event occurring on a
JcpAddress which forms part of the range specified. This should be one of the legal
dispositions namely, {@link EventFilter#EVENT_BLOCK}, {@link EventFilter#EVENT_DISCARD} or {@link EventFilter#EVENT_NOTIFY}.
@param nomatchDisposition indicates the disposition of a JCC related event occurring on a
JcpAddress which DOES not form part of the range specified. This should be one of the legal
dispositions namely, {@link EventFilter#EVENT_BLOCK}, {@link EventFilter#EVENT_DISCARD} or {@link EventFilter#EVENT_NOTIFY}.
@return EventFilter standard EventFilter provided by the JCC platform to enable
filtering of events based on the application's requirements.
@throws ResourceUnavailableException An internal resource for completing this call is unavailable.
@throws InvalidArgumentException One or more of the provided argument is not valid
@since 1.0a
*/
public EventFilter createEventFilterCauseCode(int causeCode, int matchDisposition, int nomatchDisposition) {
return new CauseCodeFilter(causeCode, matchDisposition, nomatchDisposition);
}
/**
* Find the JccAddress object that wraps the given JTAPI Address object.
* Creation date: (2000-10-31 15:17:00)
* @return net.sourceforge.gjtapi.jcc.GenCall
* @param jtapiAddr javax.telephony.Address
*/
GenAddress findAddress(FreeAddress jtapiAddr) {
DoubleWeakMap addrMap = this.getAddrMap();
synchronized(addrMap) {
GenAddress addr = (GenAddress)addrMap.get(jtapiAddr);
if (addr == null) {
addr = new GenAddress(this, jtapiAddr);
addrMap.put(jtapiAddr, addr);
}
return addr;
}
}
/**
* Find the JcatTerminalConnection object that wraps the given JTAPI TerminalConnection object.
* Creation date: (2000-10-31 15:17:00)
* @return net.sourceforge.gjtapi.jcc.GenTerminalConnection
* @param jtapiAddr javax.telephony.TerminalConnection
*/
GenTerminalConnection findTerminalConnection(FreeTerminalConnection jtapiTermConn) {
DoubleWeakMap termConnMap = this.getTermConnMap();
synchronized(termConnMap) {
GenTerminalConnection termConn = (GenTerminalConnection)termConnMap.get(jtapiTermConn);
if (termConn == null) {
termConn = new GenTerminalConnection(this, jtapiTermConn);
addrMap.put(jtapiTermConn, termConn);
}
return termConn;
}
}
/**
* Find the JccAddress object that wraps the given JTAPI Address object.
* Creation date: (2000-10-31 15:17:00)
* @return net.sourceforge.gjtapi.jcc.GenCall
* @param jtapiAddr javax.telephony.Address
*/
GenTerminal findTerminal(FreeTerminal jtapiTerm) {
DoubleWeakMap termMap = this.getTermMap();
synchronized(termMap) {
GenTerminal term = (GenTerminal)termMap.get(jtapiTerm);
if (term == null) {
term = new GenTerminal(this, jtapiTerm);
addrMap.put(jtapiTerm, term);
}
return term;
}
}
/**
* Find the JccCall object that wraps the given JTAPI call object.
* Creation date: (2000-10-31 15:17:00)
* @return net.sourceforge.gjtapi.jcc.GenCall
* @param jtapiCall javax.telephony.Call
*/
GenCall findCall(FreeCall jtapiCall) {
DoubleWeakMap callMap = this.getCallMap();
synchronized(callMap) {
GenCall call = (GenCall)callMap.get(jtapiCall);
if (call == null) {
call = new GenCall(this, jtapiCall);
callMap.put(jtapiCall, call);
}
return call;
}
}
/**
* Find the JccConnection object that wraps the given JTAPI Connection object.
* Creation date: (2000-10-31 15:17:00)
* @return net.sourceforge.gjtapi.jcc.GenCall
* @param jtapiconn javax.telephony.Connection
*/
GenConnection findConnection(FreeConnection jtapiConn) {
DoubleWeakMap connMap = this.getConnMap();
synchronized(connMap) {
GenConnection conn = (GenConnection)connMap.get(jtapiConn);
if (conn == null) {
conn = new GenConnection(this, jtapiConn);
connMap.put(jtapiConn, conn);
}
return conn;
}
}
/**
* getAddress method comment.
*/
public JccAddress getAddress(String number) throws javax.csapi.cc.jcc.InvalidPartyException {
try {
return this.findAddress((FreeAddress)this.getGenProv().getAddress(number));
} catch (javax.telephony.InvalidArgumentException iae) {
throw new javax.csapi.cc.jcc.InvalidPartyException(
javax.csapi.cc.jcc.InvalidPartyException.UNKNOWN_PARTY,
iae.getMessage());
}
}
/**
* Get the weak map to the set of Addresses, indexed by JTAPI Addresses
* Creation date: (2002-10-31 15:15:21)
* @return net.sourceforge.gjtapi.jcc.Provider.DoubleWeakMap
*/
private net.sourceforge.gjtapi.jcc.Provider.DoubleWeakMap getAddrMap() {
return addrMap;
}
/**
* Get the weak map to the set of Terminals, indexed by JTAPI Terminals
* Creation date: (2003-10-31 15:15:21)
* @return net.sourceforge.gjtapi.jcc.Provider.DoubleWeakMap
*/
private net.sourceforge.gjtapi.jcc.Provider.DoubleWeakMap getTermMap() {
return termMap;
}
/**
* Get the weak map to the set of TerminalConnections, indexed by JTAPI TerminalConnections
* Creation date: (2003-10-31 15:15:21)
* @return net.sourceforge.gjtapi.jcc.Provider.DoubleWeakMap
*/
private net.sourceforge.gjtapi.jcc.Provider.DoubleWeakMap getTermConnMap() {
return termConnMap;
}
/**
* Return the map of listeners to adapters for calls.
* Creation date: (2000-11-09 16:15:38)
* @return java.util.Map
*/
private Map getCallListeners() {
return callListeners;
}
/**
* Private accessor for the map between the JccCall and the GJTAPI Call object.
* Creation date: (2000-10-31 15:15:21)
* @return net.sourceforge.gjtapi.jcc.Provider.DoubleWeakMap
*/
private net.sourceforge.gjtapi.jcc.Provider.DoubleWeakMap getCallMap() {
return callMap;
}
/**
* Private accessor for the map between the JccConnectionl and the GJTAPI Connectionl object.
* Creation date: (2000-10-31 15:15:21)
* @return net.sourceforge.gjtapi.jcc.Provider.DoubleWeakMap
*/
private net.sourceforge.gjtapi.jcc.Provider.DoubleWeakMap getConnMap() {
return connMap;
}
/**
* Accessor for the Generic JTAPI Provider I wrap.
* Creation date: (2000-10-10 12:36:45)
* @return net.sourceforge.gjtapi.GenericProvider
*/
net.sourceforge.gjtapi.GenericProvider getGenProv() {
return genProv;
}
/**
* Get the mapping from CallLoadControlListeners to their filters.
* Creation date: (2000-11-10 12:18:07)
* @return java.util.Set
*/
private Map getLoadListeners() {
return loadListeners;
}
/**
* getName method comment.
*/
public String getName() {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -