📄 rawlistenerpool.java
字号:
*/
public void connectionInProgress(final CallId id, final String address, final int cause) {
// define action block
EventHandler eh = new EventHandler() {
public void process(Object o) {
// Forward to real delegate in a separate thread
getDelegate().connectionInProgress(id, address, cause);
}
};
// dispatch for processing
this.getEventPool().put(eh);
}
/**
* Forward on in own thread
*/
public void connectionSuspended(final CallId id, final String address, final int cause) {
// define action block
EventHandler eh = new EventHandler() {
public void process(Object o) {
// Forward to real delegate in a separate thread
getDelegate().connectionSuspended(id, address, cause);
}
};
// dispatch for processing
this.getEventPool().put(eh);
}
/**
* Get the RawListener I delegate on to.
* Creation date: (2000-05-08 14:22:40)
* @author: Richard Deadman
* @return the real RawListener
*/
private TelephonyListener getDelegate() {
return delegate;
}
/**
* Gets the event pool for holding delegate events until they can be sent to the RemoteListeners
* Creation date: (2000-05-08 14:06:14)
* @author: Richard Deadman
* @return A pool of Events to be sent to the remote listener.
*/
private BlockManager getEventPool() {
return eventPool;
}
/**
* Forward on in our own thread.
*/
public void mediaPlayPause(final String terminal, final int index, final int offset, final Symbol trigger) {
// define action block
EventHandler eh = new EventHandler() {
public void process(Object o) {
// Forward to real delegate in a separate thread
getDelegate().mediaPlayPause(terminal, index, offset, trigger);
}
};
// dispatch for processing
this.getEventPool().put(eh);
}
/**
* Forward on in our own thread.
*/
public void mediaPlayResume(final String terminal, final Symbol trigger) {
// define action block
EventHandler eh = new EventHandler() {
public void process(Object o) {
// Forward to real delegate in a separate thread
getDelegate().mediaPlayResume(terminal, trigger);
}
};
// dispatch for processing
this.getEventPool().put(eh);
}
/**
* Forward on in our own thread.
*/
public void mediaRecorderPause(final String terminal, final int duration, final Symbol trigger) {
// define action block
EventHandler eh = new EventHandler() {
public void process(Object o) {
// Forward to real delegate in a separate thread
getDelegate().mediaRecorderPause(terminal, duration, trigger);
}
};
// dispatch for processing
this.getEventPool().put(eh);
}
/**
* Forward on in our own thread.
*/
public void mediaRecorderResume(final String terminal, final Symbol trigger) {
// define action block
EventHandler eh = new EventHandler() {
public void process(Object o) {
// Forward to real delegate in a separate thread
getDelegate().mediaRecorderResume(terminal, trigger);
}
};
// dispatch for processing
this.getEventPool().put(eh);
}
/**
* Forward on in our own thread.
*/
public void mediaSignalDetectorDetected(final String terminal, final Symbol[] sigs) {
// define action block
EventHandler eh = new EventHandler() {
public void process(Object o) {
// Forward to real delegate in a separate thread
getDelegate().mediaSignalDetectorDetected(terminal, sigs);
}
};
// dispatch for processing
this.getEventPool().put(eh);
}
/**
* Forward on in our own thread.
*/
public void mediaSignalDetectorOverflow(final String terminal, final Symbol[] sigs) {
// define action block
EventHandler eh = new EventHandler() {
public void process(Object o) {
// Forward to real delegate in a separate thread
getDelegate().mediaSignalDetectorOverflow(terminal, sigs);
}
};
// dispatch for processing
this.getEventPool().put(eh);
}
/**
* Forward on in our own thread.
*/
public void mediaSignalDetectorPatternMatched(final String terminal, final Symbol[] sigs, final int index) {
// define action block
EventHandler eh = new EventHandler() {
public void process(Object o) {
// Forward to real delegate in a separate thread
getDelegate().mediaSignalDetectorPatternMatched(terminal, sigs, index);
}
};
// dispatch for processing
this.getEventPool().put(eh);
}
/**
* providerPrivateData method comment.
*/
public void providerPrivateData(final Serializable data, final int cause) {
// define action block
EventHandler eh = new EventHandler() {
public void process(Object o) {
// Forward to real delegate in a separate thread
getDelegate().providerPrivateData(data, cause);
}
};
// dispatch for processing
this.getEventPool().put(eh);
}
/**
* Set the RawListener I delegate to.
* Creation date: (2000-05-08 14:22:40)
* @author: Richard Deadman
* @param newDelegate The delegate to eventually receive my calls.
*/
private void setDelegate(TelephonyListener newDelegate) {
delegate = newDelegate;
}
/**
* Sets the event pool for holding delegate events until they can be sent to the RemoteListeners
* Creation date: (2000-05-08 14:06:14)
* @author: Richard Deadman
* @param A pool of Events to be sent to the remote listener.
*/
private void setEventPool(BlockManager newEventPool) {
eventPool = newEventPool;
}
/**
* Forward on in our own thread.
*/
public void terminalConnectionCreated(final CallId id, final String address, final String terminal, final int cause) {
// define action block
EventHandler eh = new EventHandler() {
public void process(Object o) {
// Forward to real delegate in a separate thread
getDelegate().terminalConnectionCreated(id, address, terminal, cause);
}
};
// dispatch for processing
this.getEventPool().put(eh);
}
/**
* Forward on in our own thread.
*/
public void terminalConnectionDropped(final CallId id, final String address, final String terminal, final int cause) {
// define action block
EventHandler eh = new EventHandler() {
public void process(Object o) {
// Forward to real delegate in a separate thread
getDelegate().terminalConnectionDropped(id, address, terminal, cause);
}
};
// dispatch for processing
this.getEventPool().put(eh);
}
/**
* Forward on in our own thread.
*/
public void terminalConnectionHeld(final CallId id, final String address, final String terminal, final int cause) {
// define action block
EventHandler eh = new EventHandler() {
public void process(Object o) {
// Forward to real delegate in a separate thread
getDelegate().terminalConnectionHeld(id, address, terminal, cause);
}
};
// dispatch for processing
this.getEventPool().put(eh);
}
/**
* Forward on in our own thread.
*/
public void terminalConnectionRinging(final CallId id, final String address, final String terminal, final int cause) {
// define action block
EventHandler eh = new EventHandler() {
public void process(Object o) {
// Forward to real delegate in a separate thread
getDelegate().terminalConnectionRinging(id, address, terminal, cause);
}
};
// dispatch for processing
this.getEventPool().put(eh);
}
/**
* Forward on in our own thread.
*/
public void terminalConnectionTalking(final CallId id, final String address, final String terminal, final int cause) {
// define action block
EventHandler eh = new EventHandler() {
public void process(Object o) {
// Forward to real delegate in a separate thread
getDelegate().terminalConnectionTalking(id, address, terminal, cause);
}
};
// dispatch for processing
this.getEventPool().put(eh);
}
/**
* terminalPrivateData method comment.
*/
public void terminalPrivateData(final String terminal, final Serializable data, final int cause) {
// define action block
EventHandler eh = new EventHandler() {
public void process(Object o) {
// Forward to real delegate in a separate thread
getDelegate().terminalPrivateData(terminal, data, cause);
}
};
// dispatch for processing
this.getEventPool().put(eh);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -