[Beepcore-java-commits] CVS: beepcore-java/src/org/beepcore/beep/core/event ChannelAdapter.java,NONE
Status: Beta
Brought to you by:
huston
Update of /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/core/event In directory usw-pr-cvs1:/tmp/cvs-serv21908/src/org/beepcore/beep/core/event Added Files: ChannelAdapter.java ChannelEvent.java ChannelListener.java SessionAdapter.java SessionEvent.java SessionListener.java Log Message: Rewrote SessionEvent to follow the java event delegation model --- NEW FILE: ChannelAdapter.java --- /* * ChannelAdapter.java $Revision: 1.1 $ $Date: 2001/11/22 15:25:29 $ * * Copyright (c) 2001 Huston Franklin. All rights reserved. * * The contents of this file are subject to the Blocks Public License (the * "License"); You may not use this file except in compliance with the License. * * You may obtain a copy of the License at http://www.beepcore.org/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * */ package org.beepcore.beep.core.event; /** * This is class provides a default nop implementation for each method * in <code>ChannelListener</code>. * * @author Huston Franklin * @version $Revision: 1.1 $, $Date: 2001/11/22 15:25:29 $ */ public class ChannelAdapter implements ChannelListener { public void channelStarted(ChannelEvent e) {} public void channelClosed(ChannelEvent e) {} } --- NEW FILE: ChannelEvent.java --- /* * ChannelEvent.java $Revision: 1.1 $ $Date: 2001/11/22 15:25:29 $ * * Copyright (c) 2001 Huston Franklin. All rights reserved. * * The contents of this file are subject to the Blocks Public License (the * "License"); You may not use this file except in compliance with the License. * * You may obtain a copy of the License at http://www.beepcore.org/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * */ package org.beepcore.beep.core.event; import org.beepcore.beep.core.Channel; /** * @author Huston Franklin * @version $Revision: 1.1 $, $Date: 2001/11/22 15:25:29 $ */ public class ChannelEvent extends java.util.EventObject { public ChannelEvent(Channel session) { super(session); } } --- NEW FILE: ChannelListener.java --- /* * ChannelListener.java $Revision: 1.1 $ $Date: 2001/11/22 15:25:29 $ * * Copyright (c) 2001 Huston Franklin. All rights reserved. * * The contents of this file are subject to the Blocks Public License (the * "License"); You may not use this file except in compliance with the License. * * You may obtain a copy of the License at http://www.beepcore.org/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * */ package org.beepcore.beep.core.event; import java.util.EventListener; /** * This is an interface defining the methods that must be implemented * to listen for Channel Events. * * @author Huston Franklin * @version $Revision: 1.1 $, $Date: 2001/11/22 15:25:29 $ */ public interface ChannelListener extends EventListener { /** * Invoked when the greeting has been received for a session. */ public void channelStarted(ChannelEvent e); /** * Invoked when the greeting has been received for a session. */ public void channelClosed(ChannelEvent e); } --- NEW FILE: SessionAdapter.java --- /* * SessionAdapter.java $Revision: 1.1 $ $Date: 2001/11/22 15:25:29 $ * * Copyright (c) 2001 Huston Franklin. All rights reserved. * * The contents of this file are subject to the Blocks Public License (the * "License"); You may not use this file except in compliance with the License. * * You may obtain a copy of the License at http://www.beepcore.org/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * */ package org.beepcore.beep.core.event; /** * This is class provides a default nop implementation for each method * in <code>SessionListener</code>. * * @author Huston Franklin * @version $Revision: 1.1 $, $Date: 2001/11/22 15:25:29 $ */ public class SessionAdapter implements SessionListener { public void greetingReceived(SessionEvent e) {} public void sessionClosed(SessionEvent e) {} } --- NEW FILE: SessionEvent.java --- /* * SessionEvent.java $Revision: 1.1 $ $Date: 2001/11/22 15:25:29 $ * * Copyright (c) 2001 Huston Franklin. All rights reserved. * * The contents of this file are subject to the Blocks Public License (the * "License"); You may not use this file except in compliance with the License. * * You may obtain a copy of the License at http://www.beepcore.org/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * */ package org.beepcore.beep.core.event; import org.beepcore.beep.core.Session; /** * @author Huston Franklin * @version $Revision: 1.1 $, $Date: 2001/11/22 15:25:29 $ */ public class SessionEvent extends java.util.EventObject { public final static int GREETING_RECEIVED = 1; public final static int SESSION_ABORTED = 2; public final static int SESSION_CLOSED = 3; public SessionEvent(Session session) { super(session); } } --- NEW FILE: SessionListener.java --- /* * SessionListener.java $Revision: 1.1 $ $Date: 2001/11/22 15:25:29 $ * * Copyright (c) 2001 Huston Franklin. All rights reserved. * * The contents of this file are subject to the Blocks Public License (the * "License"); You may not use this file except in compliance with the License. * * You may obtain a copy of the License at http://www.beepcore.org/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * */ package org.beepcore.beep.core.event; import java.util.EventListener; /** * This is an interface defining the methods that must be implemented * to listen for Session Events. * * @author Huston Franklin * @version $Revision: 1.1 $, $Date: 2001/11/22 15:25:29 $ */ public interface SessionListener extends EventListener { /** * Invoked when the greeting has been received for a session. */ public void greetingReceived(SessionEvent e); /** * Invoked when the greeting has been received for a session. */ public void sessionClosed(SessionEvent e); } |