Return-Path: Delivered-To: apmail-incubator-directory-cvs-archive@www.apache.org Received: (qmail 22394 invoked from network); 1 Dec 2004 06:25:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 1 Dec 2004 06:25:15 -0000 Received: (qmail 489 invoked by uid 500); 1 Dec 2004 06:25:14 -0000 Delivered-To: apmail-incubator-directory-cvs-archive@incubator.apache.org Received: (qmail 438 invoked by uid 500); 1 Dec 2004 06:25:14 -0000 Mailing-List: contact directory-cvs-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: directory-dev@incubator.apache.org Delivered-To: mailing list directory-cvs@incubator.apache.org Received: (qmail 418 invoked by uid 99); 1 Dec 2004 06:25:14 -0000 X-ASF-Spam-Status: No, hits=-10.0 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Tue, 30 Nov 2004 22:25:13 -0800 Received: (qmail 22319 invoked by uid 65534); 1 Dec 2004 06:25:12 -0000 Date: 1 Dec 2004 06:25:12 -0000 Message-ID: <20041201062512.22310.qmail@minotaur.apache.org> From: trustin@apache.org To: directory-cvs@incubator.apache.org Subject: svn commit: r109300 - in incubator/directory/seda/branches/trustin: . src/java/org/apache/netty/common src/java/org/apache/netty/downstream src/java/org/apache/netty/upstream MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Author: trustin Date: Tue Nov 30 22:25:10 2004 New Revision: 109300 URL: http://svn.apache.org/viewcvs?view=rev&rev=109300 Log: * Inserted Apache License 2.0 statement into all source codes * Applied keyword substitution to all source codes Modified: incubator/directory/seda/branches/trustin/ (props changed) incubator/directory/seda/branches/trustin/src/java/org/apache/netty/common/IdleStatus.java (contents, props changed) incubator/directory/seda/branches/trustin/src/java/org/apache/netty/common/IntraVmAddress.java (contents, props changed) incubator/directory/seda/branches/trustin/src/java/org/apache/netty/common/SessionConfig.java (contents, props changed) incubator/directory/seda/branches/trustin/src/java/org/apache/netty/downstream/Acceptor.java (contents, props changed) incubator/directory/seda/branches/trustin/src/java/org/apache/netty/downstream/Connector.java (contents, props changed) incubator/directory/seda/branches/trustin/src/java/org/apache/netty/downstream/Session.java (contents, props changed) incubator/directory/seda/branches/trustin/src/java/org/apache/netty/downstream/SessionHandler.java (contents, props changed) incubator/directory/seda/branches/trustin/src/java/org/apache/netty/upstream/Acceptor.java (props changed) incubator/directory/seda/branches/trustin/src/java/org/apache/netty/upstream/Codec.java (contents, props changed) incubator/directory/seda/branches/trustin/src/java/org/apache/netty/upstream/Connector.java (props changed) incubator/directory/seda/branches/trustin/src/java/org/apache/netty/upstream/Session.java (props changed) incubator/directory/seda/branches/trustin/src/java/org/apache/netty/upstream/SessionHandler.java (contents, props changed) Modified: incubator/directory/seda/branches/trustin/src/java/org/apache/netty/common/IdleStatus.java Url: http://svn.apache.org/viewcvs/incubator/directory/seda/branches/trustin/src/java/org/apache/netty/common/IdleStatus.java?view=diff&rev=109300&p1=incubator/directory/seda/branches/trustin/src/java/org/apache/netty/common/IdleStatus.java&r1=109299&p2=incubator/directory/seda/branches/trustin/src/java/org/apache/netty/common/IdleStatus.java&r2=109300 ============================================================================== --- incubator/directory/seda/branches/trustin/src/java/org/apache/netty/common/IdleStatus.java (original) +++ incubator/directory/seda/branches/trustin/src/java/org/apache/netty/common/IdleStatus.java Tue Nov 30 22:25:10 2004 @@ -1,11 +1,28 @@ /* + * Copyright 2004 The Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +/* * @(#) $Id$ */ package org.apache.netty.common; + /** * TODO Insert type comment. - * + * * @author Trustin Lee (trustin@apache.org) * @version $Rev$, $Date$ */ @@ -14,7 +31,6 @@ public static final IdleStatus READER_IDLE = new IdleStatus("reader idle"); public static final IdleStatus WRITER_IDLE = new IdleStatus("writer idle"); public static final IdleStatus BOTH_IDLE = new IdleStatus("both idle"); - private final String strValue; /** @@ -23,7 +39,7 @@ private IdleStatus(String strValue) { this.strValue = strValue; } - + public String toString() { return strValue; } Modified: incubator/directory/seda/branches/trustin/src/java/org/apache/netty/common/IntraVmAddress.java Url: http://svn.apache.org/viewcvs/incubator/directory/seda/branches/trustin/src/java/org/apache/netty/common/IntraVmAddress.java?view=diff&rev=109300&p1=incubator/directory/seda/branches/trustin/src/java/org/apache/netty/common/IntraVmAddress.java&r1=109299&p2=incubator/directory/seda/branches/trustin/src/java/org/apache/netty/common/IntraVmAddress.java&r2=109300 ============================================================================== --- incubator/directory/seda/branches/trustin/src/java/org/apache/netty/common/IntraVmAddress.java (original) +++ incubator/directory/seda/branches/trustin/src/java/org/apache/netty/common/IntraVmAddress.java Tue Nov 30 22:25:10 2004 @@ -1,4 +1,20 @@ /* + * Copyright 2004 The Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +/* * @(#) $Id$ */ package org.apache.netty.common; @@ -7,14 +23,14 @@ import org.apache.commons.lang.Validate; + /** * TODO Insert type comment. - * + * * @author Trustin Lee (trustin@apache.org) * @version $Rev$, $Date$ */ public class IntraVmAddress extends SocketAddress { - private final String port; /** @@ -28,20 +44,24 @@ public String getPort() { return port; } - + public int hashCode() { return port.hashCode(); } - + public boolean equals(Object o) { - if (o == null) + if (o == null) { return false; - if (this == o) + } + + if (this == o) { return true; + } + if (o instanceof IntraVmAddress) { return port.equals(((IntraVmAddress) o).getPort()); } - + return false; } } Modified: incubator/directory/seda/branches/trustin/src/java/org/apache/netty/common/SessionConfig.java Url: http://svn.apache.org/viewcvs/incubator/directory/seda/branches/trustin/src/java/org/apache/netty/common/SessionConfig.java?view=diff&rev=109300&p1=incubator/directory/seda/branches/trustin/src/java/org/apache/netty/common/SessionConfig.java&r1=109299&p2=incubator/directory/seda/branches/trustin/src/java/org/apache/netty/common/SessionConfig.java&r2=109300 ============================================================================== --- incubator/directory/seda/branches/trustin/src/java/org/apache/netty/common/SessionConfig.java (original) +++ incubator/directory/seda/branches/trustin/src/java/org/apache/netty/common/SessionConfig.java Tue Nov 30 22:25:10 2004 @@ -1,16 +1,35 @@ /* + * Copyright 2004 The Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +/* * @(#) $Id$ */ package org.apache.netty.common; + /** * TODO Insert type comment. - * + * * @author Trustin Lee (trustin@apache.org) * @version $Rev$, $Date$ */ public interface SessionConfig { int getIdleTime(IdleStatus status); + long getIdleTimeInMillis(IdleStatus status); + void setIdleTime(IdleStatus status, int idleTime); } Modified: incubator/directory/seda/branches/trustin/src/java/org/apache/netty/downstream/Acceptor.java Url: http://svn.apache.org/viewcvs/incubator/directory/seda/branches/trustin/src/java/org/apache/netty/downstream/Acceptor.java?view=diff&rev=109300&p1=incubator/directory/seda/branches/trustin/src/java/org/apache/netty/downstream/Acceptor.java&r1=109299&p2=incubator/directory/seda/branches/trustin/src/java/org/apache/netty/downstream/Acceptor.java&r2=109300 ============================================================================== --- incubator/directory/seda/branches/trustin/src/java/org/apache/netty/downstream/Acceptor.java (original) +++ incubator/directory/seda/branches/trustin/src/java/org/apache/netty/downstream/Acceptor.java Tue Nov 30 22:25:10 2004 @@ -1,18 +1,38 @@ /* + * Copyright 2004 The Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +/* * @(#) $Id$ */ package org.apache.netty.downstream; import java.io.IOException; + import java.net.SocketAddress; + /** * TODO Insert type comment. - * + * * @author Trustin Lee (trustin@apache.org) * @version $Rev$, $Date$ */ public interface Acceptor { - void bind(SocketAddress address, SessionHandler defaultHandler) throws IOException; + void bind(SocketAddress address, SessionHandler defaultHandler) + throws IOException; + void unbind(SocketAddress address); } Modified: incubator/directory/seda/branches/trustin/src/java/org/apache/netty/downstream/Connector.java Url: http://svn.apache.org/viewcvs/incubator/directory/seda/branches/trustin/src/java/org/apache/netty/downstream/Connector.java?view=diff&rev=109300&p1=incubator/directory/seda/branches/trustin/src/java/org/apache/netty/downstream/Connector.java&r1=109299&p2=incubator/directory/seda/branches/trustin/src/java/org/apache/netty/downstream/Connector.java&r2=109300 ============================================================================== --- incubator/directory/seda/branches/trustin/src/java/org/apache/netty/downstream/Connector.java (original) +++ incubator/directory/seda/branches/trustin/src/java/org/apache/netty/downstream/Connector.java Tue Nov 30 22:25:10 2004 @@ -1,4 +1,20 @@ /* + * Copyright 2004 The Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +/* * @(#) $Id$ */ package org.apache.netty.downstream; @@ -6,7 +22,7 @@ /** * TODO Insert type comment. - * + * * @author Trustin Lee (trustin@apache.org) * @version $Rev$, $Date$ */ Modified: incubator/directory/seda/branches/trustin/src/java/org/apache/netty/downstream/Session.java Url: http://svn.apache.org/viewcvs/incubator/directory/seda/branches/trustin/src/java/org/apache/netty/downstream/Session.java?view=diff&rev=109300&p1=incubator/directory/seda/branches/trustin/src/java/org/apache/netty/downstream/Session.java&r1=109299&p2=incubator/directory/seda/branches/trustin/src/java/org/apache/netty/downstream/Session.java&r2=109300 ============================================================================== --- incubator/directory/seda/branches/trustin/src/java/org/apache/netty/downstream/Session.java (original) +++ incubator/directory/seda/branches/trustin/src/java/org/apache/netty/downstream/Session.java Tue Nov 30 22:25:10 2004 @@ -1,41 +1,67 @@ /* + * Copyright 2004 The Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +/* * @(#) $Id$ */ package org.apache.netty.downstream; import java.net.SocketAddress; + import java.nio.ByteBuffer; import org.apache.netty.common.SessionConfig; + /** * TODO Insert type comment. - * + * * @author Trustin Lee (trustin@apache.org) * @version $Rev$, $Date$ */ public interface Session { SessionHandler getHandler(); + void setHandler(SessionHandler handler); - + void close(); - + ByteBuffer getWriteBuffer(); + void setMark(Object mark); + void flush(); boolean isConnected(); + boolean isClosed(); - + SessionConfig getConfig(); - + SocketAddress getRemoteAddress(); + SocketAddress getLocalAddress(); - + long getReadBytes(); + long getWrittenBytes(); long getLastIoTime(); + long getLastReadTime(); + long getLastWriteTime(); } Modified: incubator/directory/seda/branches/trustin/src/java/org/apache/netty/downstream/SessionHandler.java Url: http://svn.apache.org/viewcvs/incubator/directory/seda/branches/trustin/src/java/org/apache/netty/downstream/SessionHandler.java?view=diff&rev=109300&p1=incubator/directory/seda/branches/trustin/src/java/org/apache/netty/downstream/SessionHandler.java&r1=109299&p2=incubator/directory/seda/branches/trustin/src/java/org/apache/netty/downstream/SessionHandler.java&r2=109300 ============================================================================== --- incubator/directory/seda/branches/trustin/src/java/org/apache/netty/downstream/SessionHandler.java (original) +++ incubator/directory/seda/branches/trustin/src/java/org/apache/netty/downstream/SessionHandler.java Tue Nov 30 22:25:10 2004 @@ -1,4 +1,20 @@ /* + * Copyright 2004 The Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +/* * @(#) $Id$ */ package org.apache.netty.downstream; @@ -7,17 +23,23 @@ import org.apache.netty.common.IdleStatus; + /** * TODO Insert type comment. - * + * * @author Trustin Lee (trustin@apache.org) * @version $Rev$, $Date$ */ public interface SessionHandler { void sessionEstablished(Session session); + void sessionClosed(Session session); + void sessionIdle(Session session, IdleStatus status); + void exceptionCaught(Session session, Throwable cause); + void dataRead(Session session, ByteBuffer buf); + void markRemoved(Session session, Object mark); } Modified: incubator/directory/seda/branches/trustin/src/java/org/apache/netty/upstream/Codec.java Url: http://svn.apache.org/viewcvs/incubator/directory/seda/branches/trustin/src/java/org/apache/netty/upstream/Codec.java?view=diff&rev=109300&p1=incubator/directory/seda/branches/trustin/src/java/org/apache/netty/upstream/Codec.java&r1=109299&p2=incubator/directory/seda/branches/trustin/src/java/org/apache/netty/upstream/Codec.java&r2=109300 ============================================================================== --- incubator/directory/seda/branches/trustin/src/java/org/apache/netty/upstream/Codec.java (original) +++ incubator/directory/seda/branches/trustin/src/java/org/apache/netty/upstream/Codec.java Tue Nov 30 22:25:10 2004 @@ -1,4 +1,20 @@ /* + * Copyright 2004 The Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +/* * @(#) $Id$ */ package org.apache.netty.upstream; @@ -6,13 +22,15 @@ import org.apache.commons.codec.stateful.StatefulDecoder; import org.apache.commons.codec.stateful.StatefulEncoder; + /** * TODO Insert type comment. - * + * * @author Trustin Lee (trustin@apache.org) * @version $Rev$, $Date$ */ public interface Codec { StatefulEncoder newEncoder(Session session); + StatefulDecoder newDecoder(Session session); } Modified: incubator/directory/seda/branches/trustin/src/java/org/apache/netty/upstream/SessionHandler.java Url: http://svn.apache.org/viewcvs/incubator/directory/seda/branches/trustin/src/java/org/apache/netty/upstream/SessionHandler.java?view=diff&rev=109300&p1=incubator/directory/seda/branches/trustin/src/java/org/apache/netty/upstream/SessionHandler.java&r1=109299&p2=incubator/directory/seda/branches/trustin/src/java/org/apache/netty/upstream/SessionHandler.java&r2=109300 ============================================================================== --- incubator/directory/seda/branches/trustin/src/java/org/apache/netty/upstream/SessionHandler.java (original) +++ incubator/directory/seda/branches/trustin/src/java/org/apache/netty/upstream/SessionHandler.java Tue Nov 30 22:25:10 2004 @@ -1,21 +1,43 @@ /* + * Copyright 2004 The Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +/* * @(#) $Id$ */ package org.apache.netty.upstream; import org.apache.netty.common.IdleStatus; + /** * TODO Insert type comment. - * + * * @author Trustin Lee (trustin@apache.org) * @version $Rev$, $Date$ */ public interface SessionHandler { void sessionEstablished(Session session); + void sessionClosed(Session session); + void sessionIdle(Session session, IdleStatus status); + void exceptionCaught(Session session, Throwable cause); + void messageReceived(Session session, Object message); + void messageSent(Session session, Object message); }