• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java IEvent类的典型用法和代码示例

java 1次浏览

本文整理汇总了Java中org.red5.server.api.event.IEvent的典型用法代码示例。如果您正苦于以下问题:Java IEvent类的具体用法?Java IEvent怎么用?Java IEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

IEvent类属于org.red5.server.api.event包,在下文中一共展示了IEvent类的38个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: onCommand

点赞 3

import org.red5.server.api.event.IEvent; //导入依赖的package包/类
/**
 * @param command - command to be processed
 */
protected void onCommand(ICommand command) {
	if (!(command instanceof Notify)) {
		return;
	}
	Notify invoke = (Notify)command;
	if (invoke.getType() == IEvent.Type.STREAM_DATA) {
		return;
	}

	String method = invoke.getCall().getServiceMethodName();
	if ("screenSharerAction".equals(method)) {
		Object[] args = invoke.getCall().getArguments();
		if (args != null && args.length > 0) {
			@SuppressWarnings("unchecked")
			Map<String, Object> params = (Map<String, Object>)args[0];
			if (bool(params.get("stopPublishing"))) {
				stopPublishing();
			}
			if (params.containsKey("error")) {
				frame.setStatus("" + params.get("error"));
			}
		}
	}
}
 

开发者ID:apache,
项目名称:openmeetings,
代码行数:28,
代码来源:Core.java

示例2: dispatchEvent

点赞 3

import org.red5.server.api.event.IEvent; //导入依赖的package包/类
/**
 * Dispatches event
 * 
 * @param event
 *            Event
 */
@Override
public void dispatchEvent(IEvent event) {
    if (log.isDebugEnabled()) {
        log.debug("Event notify: {}", event);
    }
    // determine if its an outgoing invoke or notify
    switch (event.getType()) {
        case CLIENT_INVOKE:
            ClientInvokeEvent cie = (ClientInvokeEvent) event;
            invoke(cie.getMethod(), cie.getParams(), cie.getCallback());
            break;
        case CLIENT_NOTIFY:
            ClientNotifyEvent cne = (ClientNotifyEvent) event;
            notify(cne.getMethod(), cne.getParams());
            break;
        default:
            log.warn("Unhandled event: {}", event);
    }
}
 

开发者ID:Red5,
项目名称:red5-server-common,
代码行数:26,
代码来源:RTMPConnection.java

示例3: dispatchEvent

点赞 2

import org.red5.server.api.event.IEvent; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public void dispatchEvent(IEvent event) {
    Set<IConnection> conns = getClientConnections();
    for (IConnection conn : conns) {
        try {
            conn.dispatchEvent(event);
        } catch (RuntimeException e) {
            log.error("Exception during dispatching event: {}", event, e);
        }
    }
}
 

开发者ID:Red5,
项目名称:red5-server-common,
代码行数:13,
代码来源:Scope.java

示例4: dispatchEvent

点赞 2

import org.red5.server.api.event.IEvent; //导入依赖的package包/类
/**
 * Dispatches event (notifies all listeners)
 *
 * @param event Event to dispatch
 */
public void dispatchEvent(IEvent event) {
    for (IEventListener listener : listeners) {
        if (event.getSource() == null || event.getSource() != listener) {
            listener.notifyEvent(event);
        }
    }
}
 

开发者ID:Red5,
项目名称:red5-server-common,
代码行数:13,
代码来源:BasicScope.java

示例5: dispatchEvent

点赞 2

import org.red5.server.api.event.IEvent; //导入依赖的package包/类
@Override
public void dispatchEvent(IEvent event) {
    log.debug("NetStream dispatchEvent: {}", event);
    if (dispatcher != null) {
        dispatcher.dispatchEvent(event);
    }
}
 

开发者ID:Red5,
项目名称:red5-client,
代码行数:8,
代码来源:BaseRTMPClientHandler.java

示例6: dispatchEvent

点赞 2

import org.red5.server.api.event.IEvent; //导入依赖的package包/类
@Override
public void dispatchEvent(IEvent event) {
    System.out.println("ClientStream.dispachEvent()" + event.toString());
    try {
        proxy.pushMessage(null, RTMPMessage.build((IRTMPEvent) event));
    } catch (IOException e) {
        e.printStackTrace();
    }
}
 

开发者ID:Red5,
项目名称:red5-client,
代码行数:10,
代码来源:StreamRelay.java

示例7: dispatchEvent

点赞 2

import org.red5.server.api.event.IEvent; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public void dispatchEvent(IEvent event) {
	Collection<Set<IConnection>> conns = getConnections();
	for (Set<IConnection> set : conns) {
		for (IConnection conn : set) {
			try {
				conn.dispatchEvent(event);
			} catch (RuntimeException e) {
				log.error("Exception during dispatching event: {}", event, e);
			}
		}
	}
}
 

开发者ID:cwpenhale,
项目名称:red5-mobileconsole,
代码行数:15,
代码来源:Scope.java

示例8: dispatchEvent

点赞 2

import org.red5.server.api.event.IEvent; //导入依赖的package包/类
/**
 * Dispatches event (notifies all listeners)
 *
 * @param event        Event to dispatch
 */
public void dispatchEvent(IEvent event) {
	for (IEventListener listener : listeners) {
		if (event.getSource() == null || event.getSource() != listener) {
			listener.notifyEvent(event);
		}
	}
}
 

开发者ID:cwpenhale,
项目名称:red5-mobileconsole,
代码行数:13,
代码来源:BasicScope.java

示例9: dispatchEvent

点赞 2

import org.red5.server.api.event.IEvent; //导入依赖的package包/类
/** {@inheritDoc} */
public void dispatchEvent(IEvent e) {
    if (e instanceof ISharedObjectMessage || e.getType() == IEvent.Type.SHARED_OBJECT) {
        ISharedObjectMessage msg = (ISharedObjectMessage) e;
        if (msg.hasSource()) {
            beginUpdate(msg.getSource());
        } else {
            beginUpdate();
        }
        try {
            for (ISharedObjectEvent event : msg.getEvents()) {
                switch (event.getType()) {
                    case CLIENT_INITIAL_DATA:
                        initialSyncReceived = true;
                        notifyConnect();
                        break;
                    case CLIENT_CLEAR_DATA:
                        attributes.clear();
                        notifyClear();
                        break;
                    case CLIENT_DELETE_DATA:
                    case CLIENT_DELETE_ATTRIBUTE:
                        attributes.remove(event.getKey());
                        notifyDelete(event.getKey());
                        break;
                    case CLIENT_SEND_MESSAGE:
                        notifySendMessage(event.getKey(), (List<?>) event.getValue());
                        break;
                    case CLIENT_UPDATE_DATA:
                        attributes.putAll((Map<String, Object>) event.getValue());
                        notifyUpdate(event.getKey(), (Map<String, Object>) event.getValue());
                        break;
                    case CLIENT_UPDATE_ATTRIBUTE:
                        Object val = event.getValue();
                        // null values are not allowed in concurrent hash maps
                        if (val != null) {
                            attributes.put(event.getKey(), val);
                        }
                        // we will however send the null out to the subscribers
                        notifyUpdate(event.getKey(), val);
                        break;
                    default:
                        log.warn("Unknown SO event: {}", event.getType());
                }
            }
        } finally {
            endUpdate();
        }
    }
}
 

开发者ID:Red5,
项目名称:red5-server-common,
代码行数:51,
代码来源:ClientSharedObject.java

示例10: handleEvent

点赞 2

import org.red5.server.api.event.IEvent; //导入依赖的package包/类
/** {@inheritDoc} */
public boolean handleEvent(IEvent event) {
    return canHandleEvent;
}
 

开发者ID:Red5,
项目名称:red5-server-common,
代码行数:5,
代码来源:AbstractScopeAdapter.java

示例11: handleEvent

点赞 2

import org.red5.server.api.event.IEvent; //导入依赖的package包/类
@Override
public boolean handleEvent(IEvent event) {
    log.debug("handleEvent: {}", event);
    return super.handleEvent(event);
}
 

开发者ID:Red5,
项目名称:red5-server,
代码行数:6,
代码来源:MultiThreadedApplicationAdapter.java

示例12: dispatchEvent

点赞 2

import org.red5.server.api.event.IEvent; //导入依赖的package包/类
/** {@inheritDoc} */
public void dispatchEvent(IEvent event) {
    notSupported();
}
 

开发者ID:Red5,
项目名称:red5-server,
代码行数:5,
代码来源:RemotingConnection.java

示例13: handleEvent

点赞 2

import org.red5.server.api.event.IEvent; //导入依赖的package包/类
/** {@inheritDoc} */
public boolean handleEvent(IEvent event) {
    notSupported();
    return false;
}
 

开发者ID:Red5,
项目名称:red5-server,
代码行数:6,
代码来源:RemotingConnection.java

示例14: notifyEvent

点赞 2

import org.red5.server.api.event.IEvent; //导入依赖的package包/类
/** {@inheritDoc} */
public void notifyEvent(IEvent event) {
    notSupported();
}
 

开发者ID:Red5,
项目名称:red5-server,
代码行数:5,
代码来源:RemotingConnection.java

示例15: handleEvent

点赞 2

import org.red5.server.api.event.IEvent; //导入依赖的package包/类
/** {@inheritDoc} */
public boolean handleEvent(IEvent event) {
    return false;
}
 

开发者ID:Red5,
项目名称:red5-server,
代码行数:5,
代码来源:CoreHandler.java

示例16: dispatchEvent

点赞 2

import org.red5.server.api.event.IEvent; //导入依赖的package包/类
@Override
public void dispatchEvent(IEvent event) {
    System.out.println("ClientStream.dispachEvent()" + event.toString());
}
 

开发者ID:Red5,
项目名称:red5-client,
代码行数:5,
代码来源:ClientTest.java

示例17: checkSendNotifications

点赞 2

import org.red5.server.api.event.IEvent; //导入依赖的package包/类
/**
 * Check and send notification if necessary
 * @param event          Event
 */
private void checkSendNotifications(IEvent event) {
	IEventListener source = event.getSource();
	sendStartNotifications(source);
}
 

开发者ID:cwpenhale,
项目名称:red5-mobileconsole,
代码行数:9,
代码来源:ClientBroadcastStream.java

示例18: dispatchEvent

点赞 2

import org.red5.server.api.event.IEvent; //导入依赖的package包/类
/** {@inheritDoc} */
public void dispatchEvent(IEvent e) {
	if (e instanceof ISharedObjectMessage || e.getType() == IEvent.Type.SHARED_OBJECT) {
		ISharedObjectMessage msg = (ISharedObjectMessage) e;
		if (msg.hasSource()) {
			beginUpdate(msg.getSource());
		} else {
			beginUpdate();
		}
		try {
			for (ISharedObjectEvent event : msg.getEvents()) {
				switch (event.getType()) {
					case CLIENT_INITIAL_DATA:
						initialSyncReceived = true;
						notifyConnect();
						break;

					case CLIENT_CLEAR_DATA:
						attributes.clear();
						notifyClear();
						break;

					case CLIENT_DELETE_DATA:
					case CLIENT_DELETE_ATTRIBUTE:
						attributes.remove(event.getKey());
						notifyDelete(event.getKey());
						break;

					case CLIENT_SEND_MESSAGE:
						notifySendMessage(event.getKey(), (List<?>) event.getValue());
						break;

					case CLIENT_UPDATE_DATA:
						attributes.putAll((Map<String, Object>) event.getValue());
						notifyUpdate(event.getKey(), (Map<String, Object>) event.getValue());
						break;

					case CLIENT_UPDATE_ATTRIBUTE:
						Object val = event.getValue();
						// null values are not allowed in concurrent hash maps
						if (val != null) {
							attributes.put(event.getKey(), val);
						}
						// we will however send the null out to the subscribers
						notifyUpdate(event.getKey(), val);
						break;

					default:
						log.warn("Unknown SO event: {}", event.getType());
				}
			}
		} finally {
			endUpdate();
		}
	}
}
 

开发者ID:cwpenhale,
项目名称:red5-mobileconsole,
代码行数:57,
代码来源:ClientSharedObject.java

示例19: handleEvent

点赞 2

import org.red5.server.api.event.IEvent; //导入依赖的package包/类
/** {@inheritDoc} */
public boolean handleEvent(IEvent event) {
	return canHandleEvent;
}
 

开发者ID:cwpenhale,
项目名称:red5-mobileconsole,
代码行数:5,
代码来源:AbstractScopeAdapter.java

示例20: dispatchEvent

点赞 2

import org.red5.server.api.event.IEvent; //导入依赖的package包/类
/** {@inheritDoc} */
public void dispatchEvent(IEvent event) {
	notSupported();
}
 

开发者ID:cwpenhale,
项目名称:red5-mobileconsole,
代码行数:5,
代码来源:RemotingConnection.java

示例21: handleEvent

点赞 2

import org.red5.server.api.event.IEvent; //导入依赖的package包/类
/** {@inheritDoc} */
public boolean handleEvent(IEvent event) {
	notSupported();
	return false;
}
 

开发者ID:cwpenhale,
项目名称:red5-mobileconsole,
代码行数:6,
代码来源:RemotingConnection.java

示例22: notifyEvent

点赞 2

import org.red5.server.api.event.IEvent; //导入依赖的package包/类
/** {@inheritDoc} */
public void notifyEvent(IEvent event) {
	notSupported();
}
 

开发者ID:cwpenhale,
项目名称:red5-mobileconsole,
代码行数:5,
代码来源:RemotingConnection.java

示例23: handleEvent

点赞 2

import org.red5.server.api.event.IEvent; //导入依赖的package包/类
/** {@inheritDoc} */
public boolean handleEvent(IEvent event) {
	return false;
}
 

开发者ID:cwpenhale,
项目名称:red5-mobileconsole,
代码行数:5,
代码来源:CoreHandler.java

示例24: notifyEvent

点赞 2

import org.red5.server.api.event.IEvent; //导入依赖的package包/类
/** {@inheritDoc} */
public void notifyEvent(IEvent event) {
	log.debug("Event: {}", event);
}
 

开发者ID:cwpenhale,
项目名称:red5-mobileconsole,
代码行数:5,
代码来源:SharedObjectTest.java

示例25: checkSendNotifications

点赞 1

import org.red5.server.api.event.IEvent; //导入依赖的package包/类
/**
 * Check and send notification if necessary
 * 
 * @param event
 *            Event
 */
private void checkSendNotifications(IEvent event) {
    IEventListener source = event.getSource();
    sendStartNotifications(source);
}
 

开发者ID:Red5,
项目名称:red5-server-common,
代码行数:11,
代码来源:ClientBroadcastStream.java

示例26: notifyEvent

点赞 1

import org.red5.server.api.event.IEvent; //导入依赖的package包/类
/**
 * Notified on event
 * 
 * @param event
 *            Event
 */
public void notifyEvent(IEvent event) {
    log.debug("Event notify was not handled: {}", event);
}
 

开发者ID:Red5,
项目名称:red5-server-common,
代码行数:10,
代码来源:BaseConnection.java

示例27: dispatchEvent

点赞 1

import org.red5.server.api.event.IEvent; //导入依赖的package包/类
/**
 * Dispatches event
 * 
 * @param event
 *            Event
 */
public void dispatchEvent(IEvent event) {
    log.debug("Event notify was not dispatched: {}", event);
}
 

开发者ID:Red5,
项目名称:red5-server-common,
代码行数:10,
代码来源:BaseConnection.java

示例28: handleEvent

点赞 1

import org.red5.server.api.event.IEvent; //导入依赖的package包/类
/**
 * Handles event
 * 
 * @param event
 *            Event
 * @return true if associated scope was able to handle event, false otherwise
 */
public boolean handleEvent(IEvent event) {
    return getScope().handleEvent(event);
}
 

开发者ID:Red5,
项目名称:red5-server-common,
代码行数:11,
代码来源:BaseConnection.java

示例29: handleEvent

点赞 1

import org.red5.server.api.event.IEvent; //导入依赖的package包/类
/**
 * Handles event. To be implemented in subclasses.
 * 
 * @param event Event to handle
 * @return true on success, false otherwise
 */
@Override
public boolean handleEvent(IEvent event) {
    return false;
}
 

开发者ID:Red5,
项目名称:red5-server-common,
代码行数:11,
代码来源:Scope.java

示例30: handleEvent

点赞 1

import org.red5.server.api.event.IEvent; //导入依赖的package包/类
/**
 * Handles event. To be implemented in subclass realization
 *
 * @param event Event context
 * @return Event handling result
 */
public boolean handleEvent(IEvent event) {
    return false;
}
 

开发者ID:Red5,
项目名称:red5-server-common,
代码行数:10,
代码来源:BasicScope.java

示例31: dequeue

点赞 1

import org.red5.server.api.event.IEvent; //导入依赖的package包/类
/**
 * Double ended queue of event objects
 * 
 * @return Event from queue
 */
public abstract IEvent dequeue();
 

开发者ID:Red5,
项目名称:red5-server,
代码行数:7,
代码来源:IStreamSource.java

示例32: pickupEvents

点赞 1

import org.red5.server.api.event.IEvent; //导入依赖的package包/类
/**
 * Return iterator over waiting events
 * 
 * @param conn
 *            Connection
 * @return Iterator over events
 */
public Iterator<IEvent> pickupEvents(IConnection conn);
 

开发者ID:Red5,
项目名称:red5-server,
代码行数:9,
代码来源:IConnectionEventQueue.java

示例33: dequeue

点赞 1

import org.red5.server.api.event.IEvent; //导入依赖的package包/类
/**
 * Double ended queue of event objects
 * @return      Event from queue
 */
public abstract IEvent dequeue();
 

开发者ID:cwpenhale,
项目名称:red5-mobileconsole,
代码行数:6,
代码来源:IStreamSource.java

示例34: notifyEvent

点赞 1

import org.red5.server.api.event.IEvent; //导入依赖的package包/类
/**
 * Notified on event
 * @param event       Event
 */
public void notifyEvent(IEvent event) {
	log.debug("Event notify was not handled: {}", event);
}
 

开发者ID:cwpenhale,
项目名称:red5-mobileconsole,
代码行数:8,
代码来源:BaseConnection.java

示例35: dispatchEvent

点赞 1

import org.red5.server.api.event.IEvent; //导入依赖的package包/类
/**
 * Dispatches event
 * @param event       Event
 */
public void dispatchEvent(IEvent event) {
	log.debug("Event notify was not dispatched: {}", event);
}
 

开发者ID:cwpenhale,
项目名称:red5-mobileconsole,
代码行数:8,
代码来源:BaseConnection.java

示例36: handleEvent

点赞 1

import org.red5.server.api.event.IEvent; //导入依赖的package包/类
/**
 * Handles event
 * @param event        Event
 * @return             true if associated scope was able to handle event, false otherwise
 */
public boolean handleEvent(IEvent event) {
	return getScope().handleEvent(event);
}
 

开发者ID:cwpenhale,
项目名称:red5-mobileconsole,
代码行数:9,
代码来源:BaseConnection.java

示例37: handleEvent

点赞 1

import org.red5.server.api.event.IEvent; //导入依赖的package包/类
/**
 * Handles event. To be implemented in subclasses.
 * 
 * @param event Event to handle
 * @return <code>true</code> on success, <code>false</code> otherwise
 */
@Override
public boolean handleEvent(IEvent event) {
	return false;
}
 

开发者ID:cwpenhale,
项目名称:red5-mobileconsole,
代码行数:11,
代码来源:Scope.java

示例38: handleEvent

点赞 1

import org.red5.server.api.event.IEvent; //导入依赖的package包/类
/**
 * Handles event. To be implemented in subclass realization
 *
 * @param event          Event context
 * @return               Event handling result
 */
public boolean handleEvent(IEvent event) {
	return false;
}
 

开发者ID:cwpenhale,
项目名称:red5-mobileconsole,
代码行数:10,
代码来源:BasicScope.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)