Return-Path: Delivered-To: apmail-incubator-geronimo-cvs-archive@www.apache.org Received: (qmail 71808 invoked from network); 17 Mar 2004 03:16:11 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 17 Mar 2004 03:16:11 -0000 Received: (qmail 32910 invoked by uid 500); 17 Mar 2004 03:15:53 -0000 Delivered-To: apmail-incubator-geronimo-cvs-archive@incubator.apache.org Received: (qmail 32888 invoked by uid 500); 17 Mar 2004 03:15:52 -0000 Mailing-List: contact geronimo-cvs-help@incubator.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: geronimo-dev@incubator.apache.org Delivered-To: mailing list geronimo-cvs@incubator.apache.org Received: (qmail 32874 invoked from network); 17 Mar 2004 03:15:52 -0000 Received: from unknown (HELO minotaur.apache.org) (209.237.227.194) by daedalus.apache.org with SMTP; 17 Mar 2004 03:15:52 -0000 Received: (qmail 71793 invoked by uid 1751); 17 Mar 2004 03:16:10 -0000 Date: 17 Mar 2004 03:16:10 -0000 Message-ID: <20040317031610.71792.qmail@minotaur.apache.org> From: adc@apache.org To: incubator-geronimo-cvs@apache.org Subject: cvs commit: incubator-geronimo/modules/security/src/test/org/apache/geronimo/security/network/protocol SubjectCarryingProtocolTest.java TestProtocol.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N adc 2004/03/16 19:16:10 Modified: modules/security/src/java/org/apache/geronimo/security/network/protocol SubjectCarryingClientProtocol.java SubjectCarryingServerProtocol.java modules/security/src/test/org/apache/geronimo/security/network/protocol SubjectCarryingProtocolTest.java TestProtocol.java Log: Removed likeness to GBean Revision Changes Path 1.3 +10 -7 incubator-geronimo/modules/security/src/java/org/apache/geronimo/security/network/protocol/SubjectCarryingClientProtocol.java Index: SubjectCarryingClientProtocol.java =================================================================== RCS file: /home/cvs/incubator-geronimo/modules/security/src/java/org/apache/geronimo/security/network/protocol/SubjectCarryingClientProtocol.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- SubjectCarryingClientProtocol.java 10 Mar 2004 09:59:26 -0000 1.2 +++ SubjectCarryingClientProtocol.java 17 Mar 2004 03:16:10 -0000 1.3 @@ -41,16 +41,19 @@ private Subject clientSubject; - public void doStart() throws ProtocolException { + public void setup() throws ProtocolException { log.trace("Starting"); } - public void doStop() throws ProtocolException { + public void drain() throws ProtocolException { log.trace("Stopping"); } + public void teardown() throws ProtocolException { + } + public void sendUp(UpPacket packet) throws ProtocolException { - getUp().sendUp(packet); + getUpProtocol().sendUp(packet); } public void sendDown(DownPacket packet) throws ProtocolException { @@ -59,7 +62,7 @@ PassthroughDownPacket passthroughPacket = new PassthroughDownPacket(); passthroughPacket.setBuffers(packet.getBuffers()); - getDown().sendDown(passthroughPacket); + getDownProtocol().sendDown(passthroughPacket); } else { clientSubject = subject; Collection principals = clientSubject.getPrincipals(IdentificationPrincipal.class); @@ -68,7 +71,7 @@ PassthroughDownPacket passthroughPacket = new PassthroughDownPacket(); passthroughPacket.setBuffers(packet.getBuffers()); - getDown().sendDown(passthroughPacket); + getDownProtocol().sendDown(passthroughPacket); } else { IdentificationPrincipal principal = (IdentificationPrincipal) principals.iterator().next(); @@ -76,7 +79,7 @@ subjectPacket.setSubjectId(principal.getId()); subjectPacket.setBuffers(packet.getBuffers()); - getDown().sendDown(subjectPacket); + getDownProtocol().sendDown(subjectPacket); } } } 1.3 +9 -6 incubator-geronimo/modules/security/src/java/org/apache/geronimo/security/network/protocol/SubjectCarryingServerProtocol.java Index: SubjectCarryingServerProtocol.java =================================================================== RCS file: /home/cvs/incubator-geronimo/modules/security/src/java/org/apache/geronimo/security/network/protocol/SubjectCarryingServerProtocol.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- SubjectCarryingServerProtocol.java 10 Mar 2004 09:59:26 -0000 1.2 +++ SubjectCarryingServerProtocol.java 17 Mar 2004 03:16:10 -0000 1.3 @@ -46,32 +46,35 @@ private Subject clientSubject; - public void doStart() throws ProtocolException { + public void setup() throws ProtocolException { log.trace("Starting"); } - public void doStop() throws ProtocolException { + public void drain() throws ProtocolException { log.trace("Stopping"); } + public void teardown() throws ProtocolException { + } + public void sendUp(UpPacket packet) throws ProtocolException { log.trace("sendUp"); UpPacket p = SubjectCarryingPacketReader.getInstance().read(packet.getBuffer()); if (p instanceof PassthroughUpPacket) { MetadataSupport.setSubject(packet, clientSubject); - getUp().sendUp(packet); + getUpProtocol().sendUp(packet); } else if (p instanceof SubjectCarryingUpPacket) { SubjectCarryingUpPacket subjectPacket = (SubjectCarryingUpPacket)p; clientSubject = ContextManager.getRegisteredSubject(subjectPacket.getSubjectId()); MetadataSupport.setSubject(packet, clientSubject); - getUp().sendUp(packet); + getUpProtocol().sendUp(packet); } } public void sendDown(DownPacket packet) throws ProtocolException { log.trace("sendDown"); - getDown().sendDown(packet); + getDownProtocol().sendDown(packet); } public Collection cook(ControlContext context) { 1.5 +6 -6 incubator-geronimo/modules/security/src/test/org/apache/geronimo/security/network/protocol/SubjectCarryingProtocolTest.java Index: SubjectCarryingProtocolTest.java =================================================================== RCS file: /home/cvs/incubator-geronimo/modules/security/src/test/org/apache/geronimo/security/network/protocol/SubjectCarryingProtocolTest.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- SubjectCarryingProtocolTest.java 14 Mar 2004 01:01:49 -0000 1.4 +++ SubjectCarryingProtocolTest.java 17 Mar 2004 03:16:10 -0000 1.5 @@ -127,7 +127,7 @@ clientStack.push(ccp); - clientStack.doStart(); + clientStack.setup(); clientStack.sendDown(getPlainPacket()); clientStack.sendDown(getPlainPacket()); @@ -135,7 +135,7 @@ Thread.sleep(5 * 1000); - clientStack.doStop(); + clientStack.drain(); shutdownLatch.release(); @@ -239,15 +239,15 @@ ssa.setTimeOut(5 * 1000); ssa.setUri(new URI("async://localhost:0/?tcp.nodelay=true&tcp.backlog=5#")); ssa.setAcceptorListener(pf); - ssa.doStart(); + ssa.startup(); startLatch.release(); shutdownLatch.acquire(); - ssa.doStop(); + ssa.drain(); - pf.doStop(); + pf.drain(); sm.doStop(); 1.3 +8 -6 incubator-geronimo/modules/security/src/test/org/apache/geronimo/security/network/protocol/TestProtocol.java Index: TestProtocol.java =================================================================== RCS file: /home/cvs/incubator-geronimo/modules/security/src/test/org/apache/geronimo/security/network/protocol/TestProtocol.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- TestProtocol.java 10 Mar 2004 09:59:27 -0000 1.2 +++ TestProtocol.java 17 Mar 2004 03:16:10 -0000 1.3 @@ -88,10 +88,13 @@ this.selectorManager = selectorManager; } - public void doStart() throws ProtocolException { + public void setup() throws ProtocolException { } - public void doStop() throws ProtocolException { + public void drain() throws ProtocolException { + } + + public void teardown() throws ProtocolException { } public void sendUp(UpPacket packet) throws ProtocolException { @@ -106,12 +109,12 @@ Subject subject = MetadataSupport.getSubject(packet); if (subject != null) log.trace("Subject passed: " + subject); - if (getUp() != null) getUp().sendUp(packet); + if (getUpProtocol() != null) getUpProtocol().sendUp(packet); } public void sendDown(DownPacket packet) throws ProtocolException { log.trace("sendDown"); - getDown().sendDown(packet); + getDownProtocol().sendDown(packet); } public Collection cook(ControlContext context) { @@ -145,7 +148,6 @@ ref.setReferenceName("SelectorManager"); ref.setReferenceId(context.assignId(selectorManager)); items.add(ref); - return items; }