directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r379013 [37/45] - in /directory/trunks/apacheds: ./ core-plugin/ core-plugin/src/main/java/org/apache/directory/server/core/tools/schema/ core-plugin/src/test/java/org/apache/directory/server/core/tools/schema/ core-shared/ core-shared/src/...
Date Mon, 20 Feb 2006 03:58:21 GMT
Modified: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/ExtendedOperationHandler.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/ExtendedOperationHandler.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/ExtendedOperationHandler.java (original)
+++ directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/ExtendedOperationHandler.java Sun Feb 19 19:57:02 2006
@@ -1,84 +1,89 @@
-/*
- *   @(#) $Id$
- *   
- *   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.
- *
- */
-package org.apache.directory.server.ldap;
-
-
-import java.util.Set;
-
-import org.apache.directory.shared.ldap.message.ExtendedRequest;
-import org.apache.mina.common.IoSession;
-import org.apache.mina.registry.Service;
-import org.apache.mina.registry.ServiceRegistry;
-
-
-/**
- * An extension (hook) point that enables an implementor to provide his or her
- * own LDAP 'Extended' operation.  
- *
- * @author The Apache Directory Project
- * @version $Rev$, $Date$
- *
- */
-public interface ExtendedOperationHandler
-{
-    /**
-     * Returns the EXTENSION_OID of the extended request this handler can handle.
-     */
-    String getOid();
-    
-    /**
-     * The OIDs of the extensions supported by this handler.  This includes the 
-     * request as well as any responses associated with the request.  These OIDs 
-     * will be registered with the server to publish them as supportedExtensions.
-     * 
-     * @return the OIDs supported by this handler.
-     */
-    Set getExtensionOids();
-    
-    /**
-     * Handles the specified extended operation.
-     * 
-     * @param session the MINA session object related with current connection
-     * @param req the LDAP Extended operation request
-     * 
-     * @throws Exception if failed to handle the operation
-     */
-    void handleExtendedOperation( IoSession session, SessionRegistry registry, ExtendedRequest req ) throws Exception;
-    
-    /**
-     * Sets the LDAP provider for this extendedOperation handler.
-     * 
-     * @param provider the ldap protocol provider 
-     */
-    void setLdapProvider( LdapProtocolProvider provider );
-    
-    /**
-     * Sets the LDAP service for the this extenedOperation handler.
-     * 
-     * @param service the MINA service for LDAP or LDAPS
-     */
-    void setLdapService( Service service );
-    
-    /**
-     * Sets the MINA service registry for this extendedOperation handler.
-     * 
-     * @param registry the MINA service registry
-     */
-    void setServiceRegistry( ServiceRegistry registry );
-}
+/*
+ *   @(#) $Id$
+ *   
+ *   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.
+ *
+ */
+package org.apache.directory.server.ldap;
+
+
+import java.util.Set;
+
+import org.apache.directory.shared.ldap.message.ExtendedRequest;
+import org.apache.mina.common.IoSession;
+import org.apache.mina.registry.Service;
+import org.apache.mina.registry.ServiceRegistry;
+
+
+/**
+ * An extension (hook) point that enables an implementor to provide his or her
+ * own LDAP 'Extended' operation.  
+ *
+ * @author The Apache Directory Project
+ * @version $Rev$, $Date$
+ *
+ */
+public interface ExtendedOperationHandler
+{
+    /**
+     * Returns the EXTENSION_OID of the extended request this handler can handle.
+     */
+    String getOid();
+
+
+    /**
+     * The OIDs of the extensions supported by this handler.  This includes the 
+     * request as well as any responses associated with the request.  These OIDs 
+     * will be registered with the server to publish them as supportedExtensions.
+     * 
+     * @return the OIDs supported by this handler.
+     */
+    Set getExtensionOids();
+
+
+    /**
+     * Handles the specified extended operation.
+     * 
+     * @param session the MINA session object related with current connection
+     * @param req the LDAP Extended operation request
+     * 
+     * @throws Exception if failed to handle the operation
+     */
+    void handleExtendedOperation( IoSession session, SessionRegistry registry, ExtendedRequest req ) throws Exception;
+
+
+    /**
+     * Sets the LDAP provider for this extendedOperation handler.
+     * 
+     * @param provider the ldap protocol provider 
+     */
+    void setLdapProvider( LdapProtocolProvider provider );
+
+
+    /**
+     * Sets the LDAP service for the this extenedOperation handler.
+     * 
+     * @param service the MINA service for LDAP or LDAPS
+     */
+    void setLdapService( Service service );
+
+
+    /**
+     * Sets the MINA service registry for this extendedOperation handler.
+     * 
+     * @param registry the MINA service registry
+     */
+    void setServiceRegistry( ServiceRegistry registry );
+}

Propchange: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/ExtendedOperationHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/ExtendedOperationHandler.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -1 +1,4 @@
-HeadURL Id LastChangedBy LastChangedDate LastChangedRevision
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolProvider.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolProvider.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolProvider.java (original)
+++ directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolProvider.java Sun Feb 19 19:57:02 2006
@@ -71,7 +71,6 @@
 import org.apache.directory.shared.ldap.message.UnbindRequest;
 import org.apache.directory.shared.ldap.message.UnbindRequestImpl;
 import org.apache.directory.shared.ldap.message.extended.NoticeOfDisconnect;
-import org.apache.directory.shared.ldap.message.spi.Provider;
 import org.apache.mina.common.IoFilterChain;
 import org.apache.mina.common.IoHandler;
 import org.apache.mina.common.IoSession;
@@ -101,7 +100,7 @@
     private static final Map DEFAULT_HANDLERS;
     /** a set of supported controls */
     private static final Set SUPPORTED_CONTROLS;
-    
+
     static
     {
         HashMap map = new HashMap();
@@ -147,10 +146,10 @@
         map.put( UnbindRequestImpl.class.getName(), UnbindHandler.class );
 
         DEFAULT_HANDLERS = Collections.unmodifiableMap( map );
-        
+
         HashSet set = new HashSet();
-        set.add( PersistentSearchControl.CONTROL_OID );  
-        set.add( EntryChangeControl.CONTROL_OID ); 
+        set.add( PersistentSearchControl.CONTROL_OID );
+        set.add( EntryChangeControl.CONTROL_OID );
         set.add( ManageDsaITControl.CONTROL_OID );
         SUPPORTED_CONTROLS = Collections.unmodifiableSet( set );
     }
@@ -161,6 +160,7 @@
     /** the MINA protocol handler */
     private final LdapProtocolHandler handler = new LdapProtocolHandler();
 
+
     // ------------------------------------------------------------------------
     // C O N S T R U C T O R S
     // ------------------------------------------------------------------------
@@ -171,7 +171,7 @@
      * @param env environment properties used to configure the provider and
      * underlying codec providers if any
      */
-    public LdapProtocolProvider( Hashtable env ) throws LdapNamingException
+    public LdapProtocolProvider(Hashtable env) throws LdapNamingException
     {
         Hashtable copy = ( Hashtable ) env.clone();
         copy.put( Context.PROVIDER_URL, "" );
@@ -179,19 +179,19 @@
         new SessionRegistry( copy );
 
         Iterator requestTypes = DEFAULT_HANDLERS.keySet().iterator();
-        while( requestTypes.hasNext() )
+        while ( requestTypes.hasNext() )
         {
             MessageHandler handler = null;
             String type = ( String ) requestTypes.next();
             Class clazz = null;
 
-            if( copy.containsKey( type ) )
+            if ( copy.containsKey( type ) )
             {
                 try
                 {
                     clazz = Class.forName( ( String ) copy.get( type ) );
                 }
-                catch( ClassNotFoundException e )
+                catch ( ClassNotFoundException e )
                 {
                     LdapNamingException lne;
                     String msg = "failed to load class " + clazz;
@@ -212,7 +212,7 @@
                 handler = ( MessageHandler ) clazz.newInstance();
                 this.handler.addMessageHandler( typeClass, handler );
             }
-            catch( Exception e )
+            catch ( Exception e )
             {
                 LdapNamingException lne;
                 String msg = "failed to create handler instance of " + clazz;
@@ -226,6 +226,7 @@
         this.codecFactory = new ProtocolCodecFactoryImpl( copy );
     }
 
+
     /**
      * Creates a MINA LDAP protocol provider.
      */
@@ -235,7 +236,7 @@
         new SessionRegistry( null );
 
         Iterator requestTypes = DEFAULT_HANDLERS.keySet().iterator();
-        while( requestTypes.hasNext() )
+        while ( requestTypes.hasNext() )
         {
             MessageHandler handler = null;
             String type = ( String ) requestTypes.next();
@@ -249,7 +250,7 @@
                 handler = ( MessageHandler ) clazz.newInstance();
                 this.handler.addMessageHandler( typeClass, handler );
             }
-            catch( Exception e )
+            catch ( Exception e )
             {
                 LdapNamingException lne;
                 String msg = "failed to create handler instance of " + clazz;
@@ -263,6 +264,7 @@
         this.codecFactory = new ProtocolCodecFactoryImpl();
     }
 
+
     // ------------------------------------------------------------------------
     // ProtocolProvider Methods
     // ------------------------------------------------------------------------
@@ -272,16 +274,19 @@
         return SERVICE_NAME;
     }
 
+
     public ProtocolCodecFactory getCodecFactory()
     {
         return codecFactory;
     }
 
+
     public IoHandler getHandler()
     {
         return handler;
     }
-    
+
+
     /**
      * Registeres the specified {@link ExtendedOperationHandler} to this
      * protocol provider to provide a specific LDAP extended operation.
@@ -293,7 +298,8 @@
         eh = ( ExtendedHandler ) handler.getMessageHandler( ExtendedRequestImpl.class );
         eh.addHandler( eoh );
     }
-    
+
+
     /**
      * Deregisteres an {@link ExtendedOperationHandler} with the specified <tt>oid</tt>
      * from this protocol provider.
@@ -305,7 +311,8 @@
         eh = ( ExtendedHandler ) handler.getMessageHandler( ExtendedRequestImpl.class );
         eh.removeHandler( oid );
     }
-    
+
+
     /**
      * Returns an {@link ExtendedOperationHandler} with the specified <tt>oid</tt>
      * which is registered to this protocol provider.
@@ -315,7 +322,8 @@
         ExtendedHandler eh = ( ExtendedHandler ) handler.getMessageHandler( ExtendedRequest.class );
         return eh.getHandler( oid );
     }
-    
+
+
     /**
      * Returns a {@link Map} of all registered OID-{@link ExtendedOperationHandler}
      * pairs.
@@ -325,46 +333,36 @@
         ExtendedHandler eh = ( ExtendedHandler ) handler.getMessageHandler( ExtendedRequest.class );
         return eh.getHandlerMap();
     }
+
     /**
      * A snickers based BER Decoder factory.
      */
-    private static final class ProtocolCodecFactoryImpl implements
-            ProtocolCodecFactory
+    private static final class ProtocolCodecFactoryImpl implements ProtocolCodecFactory
     {
         final Hashtable env;
 
+
         public ProtocolCodecFactoryImpl()
         {
             this.env = null;
         }
 
-        ProtocolCodecFactoryImpl( Hashtable env )
+
+        ProtocolCodecFactoryImpl(Hashtable env)
         {
             this.env = env;
         }
 
+
         public ProtocolEncoder getEncoder()
         {
-            if( env == null || env.get( Provider.BERLIB_PROVIDER ) == null )
-            {
-                return new Asn1CodecEncoder( new MessageEncoder() );
-            }
-            else
-            {
-                return new Asn1CodecEncoder( new MessageEncoder( env ) );
-            }
+            return new Asn1CodecEncoder( new MessageEncoder( env ) );
         }
 
+
         public ProtocolDecoder getDecoder()
         {
-            if( env == null || env.get( Provider.BERLIB_PROVIDER ) == null )
-            {
-                return new Asn1CodecDecoder( new MessageDecoder() );
-            }
-            else
-            {
-                return new Asn1CodecDecoder( new MessageDecoder( env ) );
-            }
+            return new Asn1CodecDecoder( new MessageDecoder( env ) );
         }
     }
 
@@ -376,12 +374,14 @@
             filters.addLast( "codec", new ProtocolCodecFilter( codecFactory ) );
             filters.addLast( "logger", new LoggingFilter() );
         }
-        
+
+
         public void sessionClosed( IoSession session )
         {
             SessionRegistry.getSingleton().remove( session );
         }
 
+
         public void messageReceived( IoSession session, Object message ) throws Exception
         {
             // Translate SSLFilter messages into LDAP extended request
@@ -394,22 +394,22 @@
             // handler should react to only SESSION_UNSECURED message
             // and degrade authentication level to 'anonymous' as specified
             // in the RFC, and this is no threat.
-            
-            if( message == SSLFilter.SESSION_SECURED )
+
+            if ( message == SSLFilter.SESSION_SECURED )
             {
                 ExtendedRequest req = new ExtendedRequestImpl( 0 );
                 req.setOid( "1.3.6.1.4.1.1466.20037" );
                 req.setPayload( "SECURED".getBytes( "ISO-8859-1" ) );
                 message = req;
             }
-            else if( message == SSLFilter.SESSION_UNSECURED )
+            else if ( message == SSLFilter.SESSION_UNSECURED )
             {
                 ExtendedRequest req = new ExtendedRequestImpl( 0 );
                 req.setOid( "1.3.6.1.4.1.1466.20037" );
                 req.setPayload( "UNSECURED".getBytes( "ISO-8859-1" ) );
                 message = req;
             }
-            
+
             if ( ( ( Request ) message ).getControls().size() > 0 && message instanceof ResultResponseRequest )
             {
                 ResultResponseRequest req = ( ResultResponseRequest ) message;
@@ -417,7 +417,7 @@
                 while ( controls.hasNext() )
                 {
                     Control control = ( Control ) controls.next();
-                    if ( control.isCritical() && ! SUPPORTED_CONTROLS.contains( control.getID() ) )
+                    if ( control.isCritical() && !SUPPORTED_CONTROLS.contains( control.getID() ) )
                     {
                         ResultResponse resp = req.getResultResponse();
                         resp.getLdapResult().setErrorMessage( "Unsupport critical control: " + control.getID() );
@@ -427,14 +427,14 @@
                     }
                 }
             }
-            
+
             super.messageReceived( session, message );
         }
-        
+
 
         public void exceptionCaught( IoSession session, Throwable cause )
         {
-            SessionLog.warn( session, 
+            SessionLog.warn( session,
                 "Unexpected exception forcing session to close: sending disconnect notice to client.", cause );
             session.write( NoticeOfDisconnect.PROTOCOLERROR );
             SessionRegistry.getSingleton().remove( session );

Propchange: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolProvider.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolProvider.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -1 +1,4 @@
 Rev
+Revision
+Date
+Id

Propchange: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProviderMonitor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProviderMonitor.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -1 +1,4 @@
 Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/SessionRegistry.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/SessionRegistry.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/SessionRegistry.java (original)
+++ directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/SessionRegistry.java Sun Feb 19 19:57:02 2006
@@ -52,7 +52,7 @@
 
     /** the set of client contexts */
     private final Map contexts = new HashMap();
-    
+
     /** outstanding requests for a session */
     private final Map requests = new HashMap();
 
@@ -88,7 +88,7 @@
      *
      * @param env the properties associated with this SessionRegistry
      */
-    SessionRegistry( Hashtable env )
+    SessionRegistry(Hashtable env)
     {
         if ( s_singleton == null )
         {
@@ -99,7 +99,6 @@
             throw new IllegalStateException( "there can only be one singlton" );
         }
 
-
         if ( env == null )
         {
             this.env = new Hashtable();
@@ -158,7 +157,7 @@
     {
         return removeOutstandingRequest( session, new Integer( messageId ) );
     }
-    
+
 
     /**
      * Removes an outstanding request from the session's outstanding request map.
@@ -173,12 +172,13 @@
         synchronized ( requests )
         {
             Map reqmap = ( Map ) requests.get( session );
-            if ( reqmap == null ) return null;
+            if ( reqmap == null )
+                return null;
             return ( Request ) reqmap.remove( id );
         }
     }
 
-    
+
     /**
      * Returns a shallow copied map of all outstanding requests for an IoSession.
      * 
@@ -194,7 +194,7 @@
         }
         return new HashMap( reqmap );
     }
-    
+
 
     /**
      * Overload that does not require boxing of primitive messageId.
@@ -208,6 +208,7 @@
         return getOutstandingRequest( session, new Integer( abandonedId ) );
     }
 
+
     /**
      * Gets an outstanding request by messageId for a session.
      * 
@@ -218,11 +219,12 @@
     public Request getOutstandingRequest( IoSession session, Integer id )
     {
         Map reqmap = ( Map ) requests.get( session );
-        if ( reqmap == null ) return null;
+        if ( reqmap == null )
+            return null;
         return ( Request ) reqmap.get( id );
     }
-    
-    
+
+
     public IoSession[] getSessions()
     {
         IoSession[] sessions;
@@ -233,8 +235,8 @@
         }
         return sessions;
     }
-    
-    
+
+
     /**
      * Gets the InitialContext to the root of the system that was gotten for
      * client.  If the context is not present then there was no bind operation
@@ -251,11 +253,11 @@
      * @return the InitialContext or null
      */
     public LdapContext getLdapContext( IoSession session, Control[] connCtls, boolean allowAnonymous )
-            throws NamingException
+        throws NamingException
     {
         LdapContext ctx = null;
 
-        synchronized( contexts )
+        synchronized ( contexts )
         {
             ctx = ( LdapContext ) contexts.get( session );
         }
@@ -293,7 +295,7 @@
         else if ( ctx != null && allowAnonymous )
         {
             ServerLdapContext slc = null;
-            if ( ! ( ctx instanceof ServerLdapContext ) )
+            if ( !( ctx instanceof ServerLdapContext ) )
             {
                 slc = ( ServerLdapContext ) ctx.lookup( "" );
             }
@@ -325,12 +327,11 @@
      * @param connCtls connection controls if any to use if creating anon context
      * @return the InitialContext or null
      */
-    public LdapContext getLdapContextOnRootDSEAccess( IoSession session, Control[] connCtls )
-            throws NamingException
+    public LdapContext getLdapContextOnRootDSEAccess( IoSession session, Control[] connCtls ) throws NamingException
     {
         LdapContext ctx = null;
 
-        synchronized( contexts )
+        synchronized ( contexts )
         {
             ctx = ( LdapContext ) contexts.get( session );
         }
@@ -370,7 +371,7 @@
      */
     public void setLdapContext( IoSession session, LdapContext ictx )
     {
-        synchronized( contexts )
+        synchronized ( contexts )
         {
             contexts.put( session, ictx );
         }
@@ -384,27 +385,27 @@
      */
     public void remove( IoSession session )
     {
-        synchronized( contexts )
+        synchronized ( contexts )
         {
             contexts.remove( session );
         }
-        
+
         Map reqmap = null;
-        synchronized( requests )
+        synchronized ( requests )
         {
             reqmap = ( Map ) requests.remove( session );
         }
-        
+
         if ( reqmap == null || reqmap.isEmpty() )
         {
             return;
         }
-        
+
         Iterator list = reqmap.values().iterator();
         while ( list.hasNext() )
         {
             Object request = list.next();
-            
+
             if ( request instanceof AbandonableRequest )
             {
                 ( ( AbandonableRequest ) request ).abandon();

Propchange: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/SessionRegistry.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/SessionRegistry.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -1 +1,4 @@
 Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/OutstandingRequestsDialog.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/OutstandingRequestsDialog.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/OutstandingRequestsDialog.java (original)
+++ directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/OutstandingRequestsDialog.java Sun Feb 19 19:57:02 2006
@@ -37,11 +37,11 @@
     private JButton jButton1 = null;
     private JButton jButton2 = null;
 
-    
+
     /**
      * This is the default constructor
      */
-    public OutstandingRequestsDialog( JFrame owner, IoSession session )
+    public OutstandingRequestsDialog(JFrame owner, IoSession session)
     {
         super( owner, true );
         this.session = session;
@@ -62,7 +62,7 @@
      */
     private void initialize()
     {
-        this.setSize(549, 341);
+        this.setSize( 549, 341 );
         this.setContentPane( getJContentPane() );
     }
 
@@ -78,7 +78,7 @@
         {
             jContentPane = new JPanel();
             jContentPane.setLayout( new BorderLayout() );
-            jContentPane.add(getJPanel(), java.awt.BorderLayout.CENTER);
+            jContentPane.add( getJPanel(), java.awt.BorderLayout.CENTER );
         }
         return jContentPane;
     }
@@ -94,10 +94,10 @@
         if ( jPanel == null )
         {
             jPanel = new JPanel();
-            jPanel.setLayout(new BorderLayout());
-            jPanel.add(getJScrollPane(), java.awt.BorderLayout.CENTER);
-            jPanel.add(getJPanel1(), java.awt.BorderLayout.SOUTH);
-            jPanel.add(getJPanel2(), java.awt.BorderLayout.NORTH);
+            jPanel.setLayout( new BorderLayout() );
+            jPanel.add( getJScrollPane(), java.awt.BorderLayout.CENTER );
+            jPanel.add( getJPanel1(), java.awt.BorderLayout.SOUTH );
+            jPanel.add( getJPanel2(), java.awt.BorderLayout.NORTH );
         }
         return jPanel;
     }
@@ -113,7 +113,7 @@
         if ( jScrollPane == null )
         {
             jScrollPane = new JScrollPane();
-            jScrollPane.setViewportView(getJTable());
+            jScrollPane.setViewportView( getJTable() );
         }
         return jScrollPane;
     }
@@ -132,14 +132,16 @@
         }
 
         setRequestsModel();
-        jTable.getSelectionModel().addListSelectionListener( new ListSelectionListener() {
-            public void valueChanged(ListSelectionEvent e)
+        jTable.getSelectionModel().addListSelectionListener( new ListSelectionListener()
+        {
+            public void valueChanged( ListSelectionEvent e )
             {
                 int row = jTable.getSelectedRow();
                 if ( row > -1 )
                 {
                     jButton2.setEnabled( true );
-                    AbandonableRequest req = ( ( OutstandingRequestsModel ) jTable.getModel() ).getAbandonableRequest( row );
+                    AbandonableRequest req = ( ( OutstandingRequestsModel ) jTable.getModel() )
+                        .getAbandonableRequest( row );
                     jTextArea.setText( req.toString() );
                     jTextArea.setEnabled( true );
                 }
@@ -149,14 +151,15 @@
                     jTextArea.setText( "" );
                     jTextArea.setEnabled( false );
                 }
-            }});
+            }
+        } );
         return jTable;
     }
 
-    
+
     private void setRequestsModel()
     {
-        AbandonableRequest[] requests; 
+        AbandonableRequest[] requests;
         Map reqsMap = SessionRegistry.getSingleton().getOutstandingRequests( session );
         if ( reqsMap != null )
         {
@@ -167,7 +170,7 @@
         {
             requests = EMPTY_REQUEST_ARRAY;
         }
-        
+
         jTable.setModel( new OutstandingRequestsModel( requests ) );
     }
 
@@ -182,8 +185,8 @@
         if ( jPanel1 == null )
         {
             jPanel1 = new JPanel();
-            jPanel1.add(getJButton(), null);
-            jPanel1.add(getJButton1(), null);
+            jPanel1.add( getJButton(), null );
+            jPanel1.add( getJButton1(), null );
         }
         return jPanel1;
     }
@@ -199,10 +202,10 @@
         if ( jButton == null )
         {
             jButton = new JButton();
-            jButton.setText("Done");
+            jButton.setText( "Done" );
             jButton.addActionListener( new java.awt.event.ActionListener()
             {
-                public void actionPerformed(java.awt.event.ActionEvent e)
+                public void actionPerformed( java.awt.event.ActionEvent e )
                 {
                     OutstandingRequestsDialog.this.setVisible( false );
                     OutstandingRequestsDialog.this.dispose();
@@ -223,12 +226,12 @@
         if ( jPanel2 == null )
         {
             jPanel2 = new JPanel();
-            jPanel2.setLayout(new BorderLayout());
-            jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Request", 
-                javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, 
-                javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null));
-            jPanel2.add(getJButton2(), java.awt.BorderLayout.WEST);
-            jPanel2.add(getJTextArea(), java.awt.BorderLayout.CENTER);
+            jPanel2.setLayout( new BorderLayout() );
+            jPanel2.setBorder( javax.swing.BorderFactory.createTitledBorder( null, "Request",
+                javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
+                javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null ) );
+            jPanel2.add( getJButton2(), java.awt.BorderLayout.WEST );
+            jPanel2.add( getJTextArea(), java.awt.BorderLayout.CENTER );
         }
         return jPanel2;
     }
@@ -245,7 +248,7 @@
         {
             jTextArea = new JTextArea();
         }
-        
+
         jTextArea.setEnabled( false );
         jTextArea.setEditable( false );
         return jTextArea;
@@ -262,10 +265,10 @@
         if ( jButton1 == null )
         {
             jButton1 = new JButton();
-            jButton1.setText("Refresh");
+            jButton1.setText( "Refresh" );
             jButton1.addActionListener( new java.awt.event.ActionListener()
             {
-                public void actionPerformed(java.awt.event.ActionEvent e)
+                public void actionPerformed( java.awt.event.ActionEvent e )
                 {
                     setRequestsModel();
                     jTextArea.setText( "" );
@@ -288,14 +291,15 @@
         if ( jButton2 == null )
         {
             jButton2 = new JButton();
-            jButton2.setText("Abandon");
+            jButton2.setText( "Abandon" );
             jButton2.setEnabled( false );
             jButton2.addActionListener( new java.awt.event.ActionListener()
             {
-                public void actionPerformed(java.awt.event.ActionEvent e)
+                public void actionPerformed( java.awt.event.ActionEvent e )
                 {
                     int row = jTable.getSelectedRow();
-                    AbandonableRequest req = ( ( OutstandingRequestsModel ) jTable.getModel() ).getAbandonableRequest( row );
+                    AbandonableRequest req = ( ( OutstandingRequestsModel ) jTable.getModel() )
+                        .getAbandonableRequest( row );
                     req.abandon();
                     SessionRegistry.getSingleton().removeOutstandingRequest( session, req.getMessageId() );
                     setRequestsModel();
@@ -304,4 +308,4 @@
         }
         return jButton2;
     }
-}  //  @jve:decl-index=0:visual-constraint="10,10"
+} //  @jve:decl-index=0:visual-constraint="10,10"

Propchange: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/OutstandingRequestsDialog.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/OutstandingRequestsModel.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/OutstandingRequestsModel.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/OutstandingRequestsModel.java (original)
+++ directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/OutstandingRequestsModel.java Sun Feb 19 19:57:02 2006
@@ -9,71 +9,83 @@
 
 public class OutstandingRequestsModel implements TableModel
 {
-    final String[] columns = new String[] { "messageId", "type" };
-    final Class[] columnClasses = new Class[] { Integer.class, String.class };
+    final String[] columns = new String[]
+        { "messageId", "type" };
+    final Class[] columnClasses = new Class[]
+        { Integer.class, String.class };
     final AbandonableRequest[] requests;
 
-    
-    OutstandingRequestsModel( AbandonableRequest[] requests )
+
+    OutstandingRequestsModel(AbandonableRequest[] requests)
     {
         this.requests = requests;
     }
 
+
     AbandonableRequest getAbandonableRequest( int row )
     {
         return requests[row];
     }
-    
+
+
     public int getRowCount()
     {
         return requests.length;
     }
 
+
     public int getColumnCount()
     {
         return columns.length;
     }
 
+
     public String getColumnName( int columnIndex )
     {
         return columns[columnIndex];
     }
 
+
     public Class getColumnClass( int columnIndex )
     {
         return columnClasses[columnIndex];
     }
 
+
     public boolean isCellEditable( int rowIndex, int columnIndex )
     {
         return false;
     }
 
+
     public Object getValueAt( int rowIndex, int columnIndex )
     {
         AbandonableRequest req = requests[rowIndex];
-        
-        switch( columnIndex )
+
+        switch ( columnIndex )
         {
-            case( 0 ):
+            case ( 0 ):
                 return new Integer( req.getMessageId() );
-            case( 1 ):
+            case ( 1 ):
                 return req.getType().toString();
             default:
                 throw new IndexOutOfBoundsException( "column index max is " + ( columns.length - 1 ) );
         }
     }
 
-    public void setValueAt(Object aValue, int rowIndex, int columnIndex)
+
+    public void setValueAt( Object aValue, int rowIndex, int columnIndex )
     {
         throw new UnsupportedOperationException();
     }
 
-    public void addTableModelListener(TableModelListener l)
+
+    public void addTableModelListener( TableModelListener l )
     {
     }
 
-    public void removeTableModelListener(TableModelListener l)
+
+    public void removeTableModelListener( TableModelListener l )
     {
     }
 }

Propchange: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/OutstandingRequestsModel.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/SessionsFrame.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/SessionsFrame.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/SessionsFrame.java (original)
+++ directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/SessionsFrame.java Sun Feb 19 19:57:02 2006
@@ -42,7 +42,6 @@
 import org.slf4j.LoggerFactory;
 
 
-
 public class SessionsFrame extends JFrame
 {
     private static final Logger log = LoggerFactory.getLogger( SessionsFrame.class );
@@ -72,19 +71,20 @@
     private JMenuItem strongAuthRequiredItem = null;
     private JPanel southPanel = null;
     private JMenuItem showRequests = null;
-//    private JPopupMenu popupMenu = null;
-//    private JMenuItem jMenuItem = null;
-//    private JMenu jMenu = null;
-//    private JMenuItem jMenuItem1 = null;
-//    private JMenuItem jMenuItem2 = null;
-//    private JMenuItem jMenuItem3 = null;
-//    private JMenuItem jMenuItem4 = null;
+    //    private JPopupMenu popupMenu = null;
+    //    private JMenuItem jMenuItem = null;
+    //    private JMenu jMenu = null;
+    //    private JMenuItem jMenuItem1 = null;
+    //    private JMenuItem jMenuItem2 = null;
+    //    private JMenuItem jMenuItem3 = null;
+    //    private JMenuItem jMenuItem4 = null;
     private JButton refreshButton = null;
-    
-    
+
     private IoSession selected;
     private JMenuItem unbindItem = null;
     private JMenuItem bindItem = null;
+
+ 
     /**
      * This is the default constructor
      */
@@ -102,13 +102,13 @@
      */
     private void initialize()
     {
-        this.setSize(789, 436);
+        this.setSize( 789, 436 );
         this.setJMenuBar( getMainMenuBar() );
         this.setContentPane( getJContentPane() );
-        this.setTitle("Sessions");
+        this.setTitle( "Sessions" );
         this.addWindowListener( new java.awt.event.WindowAdapter()
         {
-            public void windowClosing(java.awt.event.WindowEvent e)
+            public void windowClosing( java.awt.event.WindowEvent e )
             {
                 SessionsFrame.this.setVisible( false );
                 SessionsFrame.this.dispose();
@@ -128,7 +128,7 @@
         {
             jContentPane = new JPanel();
             jContentPane.setLayout( new BorderLayout() );
-            jContentPane.add(getMainPanel(), java.awt.BorderLayout.CENTER);
+            jContentPane.add( getMainPanel(), java.awt.BorderLayout.CENTER );
         }
         return jContentPane;
     }
@@ -144,10 +144,10 @@
         if ( mainPanel == null )
         {
             mainPanel = new JPanel();
-            mainPanel.setLayout(new BorderLayout());
-            mainPanel.add(getFilterPanel(), java.awt.BorderLayout.NORTH);
-            mainPanel.add(getSessionsPane(), java.awt.BorderLayout.CENTER);
-            mainPanel.add(getSouthPanel(), java.awt.BorderLayout.SOUTH);
+            mainPanel.setLayout( new BorderLayout() );
+            mainPanel.add( getFilterPanel(), java.awt.BorderLayout.NORTH );
+            mainPanel.add( getSessionsPane(), java.awt.BorderLayout.CENTER );
+            mainPanel.add( getSouthPanel(), java.awt.BorderLayout.SOUTH );
         }
         return mainPanel;
     }
@@ -163,8 +163,8 @@
         if ( sessionsPane == null )
         {
             sessionsPane = new JScrollPane();
-            sessionsPane.setName("jScrollPane");
-            sessionsPane.setViewportView(getSessionsTable());
+            sessionsPane.setName( "jScrollPane" );
+            sessionsPane.setViewportView( getSessionsTable() );
         }
         return sessionsPane;
     }
@@ -180,45 +180,46 @@
         if ( sessionsTable == null )
         {
             sessionsTable = new JTable();
-            sessionsTable.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
-//            sessionsTable.addMouseListener( new java.awt.event.MouseAdapter()
-//            {
-//                public void mouseReleased(java.awt.event.MouseEvent e)
-//                {
-//                    if ( e.getButton() == MouseEvent.BUTTON3 )
-//                    {
-//                        if ( popupMenu == null )
-//                        {
-//                            popupMenu = SessionsFrame.this.getSessionsPopupMenu();
-//                        }
-//                        popupMenu.setVisible( false );
-//                    }
-//                }
-//
-//                public void mousePressed(java.awt.event.MouseEvent e)
-//                {
-//                    if ( e.getButton() == MouseEvent.BUTTON3 )
-//                    {
-//                        if ( popupMenu == null )
-//                        {
-//                            popupMenu = SessionsFrame.this.getSessionsPopupMenu();
-//                        }
-//                        Point location = e.getComponent().getLocationOnScreen();
-//                        popupMenu.setLocation( location.x + e.getPoint().x, location.y + e.getPoint().y );
-//                        popupMenu.setVisible( true );
-//                    }
-//                }
-//            } );
+            sessionsTable.setSelectionMode( javax.swing.ListSelectionModel.SINGLE_SELECTION );
+            //            sessionsTable.addMouseListener( new java.awt.event.MouseAdapter()
+            //            {
+            //                public void mouseReleased(java.awt.event.MouseEvent e)
+            //                {
+            //                    if ( e.getButton() == MouseEvent.BUTTON3 )
+            //                    {
+            //                        if ( popupMenu == null )
+            //                        {
+            //                            popupMenu = SessionsFrame.this.getSessionsPopupMenu();
+            //                        }
+            //                        popupMenu.setVisible( false );
+            //                    }
+            //                }
+            //
+            //                public void mousePressed(java.awt.event.MouseEvent e)
+            //                {
+            //                    if ( e.getButton() == MouseEvent.BUTTON3 )
+            //                    {
+            //                        if ( popupMenu == null )
+            //                        {
+            //                            popupMenu = SessionsFrame.this.getSessionsPopupMenu();
+            //                        }
+            //                        Point location = e.getComponent().getLocationOnScreen();
+            //                        popupMenu.setLocation( location.x + e.getPoint().x, location.y + e.getPoint().y );
+            //                        popupMenu.setVisible( true );
+            //                    }
+            //                }
+            //            } );
             sessionsTable.setModel( new SessionsModel( SessionRegistry.getSingleton().getSessions() ) );
-            sessionsTable.getSelectionModel().addListSelectionListener( new ListSelectionListener() {
-                public void valueChanged(ListSelectionEvent e)
+            sessionsTable.getSelectionModel().addListSelectionListener( new ListSelectionListener()
+            {
+                public void valueChanged( ListSelectionEvent e )
                 {
                     int row = sessionsTable.getSelectedRow();
                     if ( row == -1 )
                     {
                         selected = null;
                     }
-                    else 
+                    else
                     {
                         selected = ( ( SessionsModel ) sessionsTable.getModel() ).getIoSession( row );
                         closeItem.setEnabled( true );
@@ -226,7 +227,7 @@
                         showRequests.setEnabled( true );
                     }
                 }
-            });
+            } );
         }
         return sessionsTable;
     }
@@ -242,10 +243,11 @@
         if ( filterPanel == null )
         {
             filterPanel = new JPanel();
-            filterPanel.setLayout(new BoxLayout(getFilterPanel(), BoxLayout.X_AXIS));
-            filterPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED));
-            filterPanel.add(getFilterButton(), null);
-            filterPanel.add(getFilterText(), null);
+            filterPanel.setLayout( new BoxLayout( getFilterPanel(), BoxLayout.X_AXIS ) );
+            filterPanel.setBorder( javax.swing.BorderFactory
+                .createEtchedBorder( javax.swing.border.EtchedBorder.RAISED ) );
+            filterPanel.add( getFilterButton(), null );
+            filterPanel.add( getFilterText(), null );
         }
         return filterPanel;
     }
@@ -261,7 +263,7 @@
         if ( filterButton == null )
         {
             filterButton = new JButton();
-            filterButton.setText("Filter");
+            filterButton.setText( "Filter" );
         }
         return filterButton;
     }
@@ -292,8 +294,8 @@
         if ( menuBar == null )
         {
             menuBar = new JMenuBar();
-            menuBar.add(getMenuFile());
-            menuBar.add(getMenuSession());
+            menuBar.add( getMenuFile() );
+            menuBar.add( getMenuSession() );
         }
         return menuBar;
     }
@@ -309,8 +311,8 @@
         if ( menuFile == null )
         {
             menuFile = new JMenu();
-            menuFile.setText("File");
-            menuFile.add(getExitItem());
+            menuFile.setText( "File" );
+            menuFile.add( getExitItem() );
         }
         return menuFile;
     }
@@ -326,10 +328,10 @@
         if ( exitItem == null )
         {
             exitItem = new JMenuItem();
-            exitItem.setText("exit");
+            exitItem.setText( "exit" );
             exitItem.addActionListener( new java.awt.event.ActionListener()
             {
-                public void actionPerformed(java.awt.event.ActionEvent e)
+                public void actionPerformed( java.awt.event.ActionEvent e )
                 {
                     SessionsFrame.this.setVisible( false );
                     SessionsFrame.this.dispose();
@@ -350,14 +352,14 @@
         if ( menuSession == null )
         {
             menuSession = new JMenu();
-            menuSession.setText("Session");
-            menuSession.add(getCloseItem());
+            menuSession.setText( "Session" );
+            menuSession.add( getCloseItem() );
             closeItem.setEnabled( false );
-            menuSession.add(getMenuSendNoD());
+            menuSession.add( getMenuSendNoD() );
             menuSendNoD.setEnabled( false );
-            menuSession.add(getShowRequests());
-            menuSession.add(getUnbindItem());
-            menuSession.add(getBindItem());
+            menuSession.add( getShowRequests() );
+            menuSession.add( getUnbindItem() );
+            menuSession.add( getBindItem() );
             showRequests.setEnabled( false );
         }
         return menuSession;
@@ -374,10 +376,10 @@
         if ( closeItem == null )
         {
             closeItem = new JMenuItem();
-            closeItem.setText("close");
+            closeItem.setText( "close" );
             closeItem.addActionListener( new java.awt.event.ActionListener()
             {
-                public void actionPerformed(java.awt.event.ActionEvent e)
+                public void actionPerformed( java.awt.event.ActionEvent e )
                 {
                     SessionRegistry.getSingleton().terminateSession( selected );
                     try
@@ -395,7 +397,7 @@
         return closeItem;
     }
 
-    
+
     /**
      * This method initializes jMenu	
      * 	
@@ -406,10 +408,10 @@
         if ( menuSendNoD == null )
         {
             menuSendNoD = new JMenu();
-            menuSendNoD.setText("Send NoD");
-            menuSendNoD.add(getUnavailableItem());
-            menuSendNoD.add(getProtocolErrorItem());
-            menuSendNoD.add(getStrongAuthRequiredItem());
+            menuSendNoD.setText( "Send NoD" );
+            menuSendNoD.add( getUnavailableItem() );
+            menuSendNoD.add( getProtocolErrorItem() );
+            menuSendNoD.add( getStrongAuthRequiredItem() );
         }
         return menuSendNoD;
     }
@@ -425,12 +427,12 @@
         if ( unavailableItem == null )
         {
             unavailableItem = new JMenuItem();
-            unavailableItem.setText("unavailable");
+            unavailableItem.setText( "unavailable" );
             unavailableItem.addActionListener( new java.awt.event.ActionListener()
             {
-                public void actionPerformed(java.awt.event.ActionEvent e)
+                public void actionPerformed( java.awt.event.ActionEvent e )
                 {
-                    selected.write( NoticeOfDisconnect.UNAVAILABLE ); 
+                    selected.write( NoticeOfDisconnect.UNAVAILABLE );
                     try
                     {
                         Thread.sleep( 250 );
@@ -457,12 +459,12 @@
         if ( protocolErrorItem == null )
         {
             protocolErrorItem = new JMenuItem();
-            protocolErrorItem.setText("protocolError");
+            protocolErrorItem.setText( "protocolError" );
             protocolErrorItem.addActionListener( new java.awt.event.ActionListener()
             {
-                public void actionPerformed(java.awt.event.ActionEvent e)
+                public void actionPerformed( java.awt.event.ActionEvent e )
                 {
-                    selected.write( NoticeOfDisconnect.PROTOCOLERROR ); 
+                    selected.write( NoticeOfDisconnect.PROTOCOLERROR );
                     try
                     {
                         Thread.sleep( 250 );
@@ -489,12 +491,12 @@
         if ( strongAuthRequiredItem == null )
         {
             strongAuthRequiredItem = new JMenuItem();
-            strongAuthRequiredItem.setText("strongAuthRequired");
+            strongAuthRequiredItem.setText( "strongAuthRequired" );
             strongAuthRequiredItem.addActionListener( new java.awt.event.ActionListener()
             {
-                public void actionPerformed(java.awt.event.ActionEvent e)
+                public void actionPerformed( java.awt.event.ActionEvent e )
                 {
-                    WriteFuture future = selected.write( NoticeOfDisconnect.STRONGAUTHREQUIRED ); 
+                    WriteFuture future = selected.write( NoticeOfDisconnect.STRONGAUTHREQUIRED );
                     try
                     {
                         future.join( 1000 );
@@ -513,23 +515,22 @@
     }
 
 
-//    /**
-//     * This method initializes jPopupMenu	
-//     * 	
-//     * @return javax.swing.JPopupMenu	
-//     */
-//    private JPopupMenu getSessionsPopupMenu()
-//    {
-//        if ( popupMenu == null )
-//        {
-//            popupMenu = new JPopupMenu();
-//            popupMenu.add(getJMenuItem());
-//            popupMenu.add(getJMenu());
-//            popupMenu.add(getJMenuItem4());
-//        }
-//        return popupMenu;
-//    }
-
+    //    /**
+    //     * This method initializes jPopupMenu	
+    //     * 	
+    //     * @return javax.swing.JPopupMenu	
+    //     */
+    //    private JPopupMenu getSessionsPopupMenu()
+    //    {
+    //        if ( popupMenu == null )
+    //        {
+    //            popupMenu = new JPopupMenu();
+    //            popupMenu.add(getJMenuItem());
+    //            popupMenu.add(getJMenu());
+    //            popupMenu.add(getJMenuItem4());
+    //        }
+    //        return popupMenu;
+    //    }
 
     /**
      * This method initializes jPanel	
@@ -541,8 +542,9 @@
         if ( southPanel == null )
         {
             southPanel = new JPanel();
-            southPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED));
-            southPanel.add(getRefreshButton(), null);
+            southPanel
+                .setBorder( javax.swing.BorderFactory.createEtchedBorder( javax.swing.border.EtchedBorder.RAISED ) );
+            southPanel.add( getRefreshButton(), null );
         }
         return southPanel;
     }
@@ -558,18 +560,19 @@
         if ( showRequests == null )
         {
             showRequests = new JMenuItem();
-            showRequests.setText("show requests");
+            showRequests.setText( "show requests" );
             showRequests.addActionListener( new java.awt.event.ActionListener()
             {
-                public void actionPerformed(java.awt.event.ActionEvent e)
+                public void actionPerformed( java.awt.event.ActionEvent e )
                 {
                     OutstandingRequestsDialog dialog = new OutstandingRequestsDialog( SessionsFrame.this, selected );
-                    dialog.addWindowListener( new WindowAdapter() {
-                        public void windowClosed(WindowEvent e)
+                    dialog.addWindowListener( new WindowAdapter()
+                    {
+                        public void windowClosed( WindowEvent e )
                         {
                             e.getWindow().dispose();
                         }
-                    });
+                    } );
                     dialog.setVisible( true );
                 }
             } );
@@ -578,103 +581,103 @@
     }
 
 
-//    /**
-//     * This method initializes jMenuItem	
-//     * 	
-//     * @return javax.swing.JMenuItem	
-//     */
-//    private JMenuItem getJMenuItem()
-//    {
-//        if ( jMenuItem == null )
-//        {
-//            jMenuItem = new JMenuItem();
-//            jMenuItem.setText("close");
-//        }
-//        return jMenuItem;
-//    }
-//
-//
-//    /**
-//     * This method initializes jMenu	
-//     * 	
-//     * @return javax.swing.JMenu	
-//     */
-//    private JMenu getJMenu()
-//    {
-//        if ( jMenu == null )
-//        {
-//            jMenu = new JMenu();
-//            jMenu.setText("Send NoD");
-//            jMenu.add(getJMenuItem1());
-//            jMenu.add(getJMenuItem2());
-//            jMenu.add(getJMenuItem3());
-//        }
-//        return jMenu;
-//    }
-//
-//
-//    /**
-//     * This method initializes jMenuItem1	
-//     * 	
-//     * @return javax.swing.JMenuItem	
-//     */
-//    private JMenuItem getJMenuItem1()
-//    {
-//        if ( jMenuItem1 == null )
-//        {
-//            jMenuItem1 = new JMenuItem();
-//            jMenuItem1.setText("unavailable");
-//        }
-//        return jMenuItem1;
-//    }
-//
-//
-//    /**
-//     * This method initializes jMenuItem2	
-//     * 	
-//     * @return javax.swing.JMenuItem	
-//     */
-//    private JMenuItem getJMenuItem2()
-//    {
-//        if ( jMenuItem2 == null )
-//        {
-//            jMenuItem2 = new JMenuItem();
-//            jMenuItem2.setText("protocolError");
-//        }
-//        return jMenuItem2;
-//    }
-//
-//
-//    /**
-//     * This method initializes jMenuItem3	
-//     * 	
-//     * @return javax.swing.JMenuItem	
-//     */
-//    private JMenuItem getJMenuItem3()
-//    {
-//        if ( jMenuItem3 == null )
-//        {
-//            jMenuItem3 = new JMenuItem();
-//            jMenuItem3.setText("strongAuthRequired");
-//        }
-//        return jMenuItem3;
-//    }
-//
-//
-//    /**
-//     * This method initializes jMenuItem4	
-//     * 	
-//     * @return javax.swing.JMenuItem	
-//     */
-//    private JMenuItem getJMenuItem4()
-//    {
-//        if ( jMenuItem4 == null )
-//        {
-//            jMenuItem4 = new JMenuItem();
-//            jMenuItem4.setText("show requests");
-//        }
-//        return jMenuItem4;
-//    }
+    //    /**
+    //     * This method initializes jMenuItem	
+    //     * 	
+    //     * @return javax.swing.JMenuItem	
+    //     */
+    //    private JMenuItem getJMenuItem()
+    //    {
+    //        if ( jMenuItem == null )
+    //        {
+    //            jMenuItem = new JMenuItem();
+    //            jMenuItem.setText("close");
+    //        }
+    //        return jMenuItem;
+    //    }
+    //
+    //
+    //    /**
+    //     * This method initializes jMenu	
+    //     * 	
+    //     * @return javax.swing.JMenu	
+    //     */
+    //    private JMenu getJMenu()
+    //    {
+    //        if ( jMenu == null )
+    //        {
+    //            jMenu = new JMenu();
+    //            jMenu.setText("Send NoD");
+    //            jMenu.add(getJMenuItem1());
+    //            jMenu.add(getJMenuItem2());
+    //            jMenu.add(getJMenuItem3());
+    //        }
+    //        return jMenu;
+    //    }
+    //
+    //
+    //    /**
+    //     * This method initializes jMenuItem1	
+    //     * 	
+    //     * @return javax.swing.JMenuItem	
+    //     */
+    //    private JMenuItem getJMenuItem1()
+    //    {
+    //        if ( jMenuItem1 == null )
+    //        {
+    //            jMenuItem1 = new JMenuItem();
+    //            jMenuItem1.setText("unavailable");
+    //        }
+    //        return jMenuItem1;
+    //    }
+    //
+    //
+    //    /**
+    //     * This method initializes jMenuItem2	
+    //     * 	
+    //     * @return javax.swing.JMenuItem	
+    //     */
+    //    private JMenuItem getJMenuItem2()
+    //    {
+    //        if ( jMenuItem2 == null )
+    //        {
+    //            jMenuItem2 = new JMenuItem();
+    //            jMenuItem2.setText("protocolError");
+    //        }
+    //        return jMenuItem2;
+    //    }
+    //
+    //
+    //    /**
+    //     * This method initializes jMenuItem3	
+    //     * 	
+    //     * @return javax.swing.JMenuItem	
+    //     */
+    //    private JMenuItem getJMenuItem3()
+    //    {
+    //        if ( jMenuItem3 == null )
+    //        {
+    //            jMenuItem3 = new JMenuItem();
+    //            jMenuItem3.setText("strongAuthRequired");
+    //        }
+    //        return jMenuItem3;
+    //    }
+    //
+    //
+    //    /**
+    //     * This method initializes jMenuItem4	
+    //     * 	
+    //     * @return javax.swing.JMenuItem	
+    //     */
+    //    private JMenuItem getJMenuItem4()
+    //    {
+    //        if ( jMenuItem4 == null )
+    //        {
+    //            jMenuItem4 = new JMenuItem();
+    //            jMenuItem4.setText("show requests");
+    //        }
+    //        return jMenuItem4;
+    //    }
 
     /**
      * This method initializes jButton2	
@@ -689,7 +692,7 @@
             refreshButton.setText( REFRESH_COMMAND );
             refreshButton.addActionListener( new java.awt.event.ActionListener()
             {
-                public void actionPerformed(java.awt.event.ActionEvent e)
+                public void actionPerformed( java.awt.event.ActionEvent e )
                 {
                     if ( e.getActionCommand() == REFRESH_COMMAND )
                     {
@@ -701,7 +704,7 @@
         return refreshButton;
     }
 
-    
+
     private void refresh()
     {
         log.info( "Refreshing Sessions UI" );
@@ -710,7 +713,7 @@
         menuSendNoD.setEnabled( false );
         showRequests.setEnabled( false );
         unbindItem.setEnabled( isServiceBound );
-        bindItem.setEnabled( ! isServiceBound );
+        bindItem.setEnabled( !isServiceBound );
     }
 
 
@@ -724,8 +727,8 @@
     {
         this.ldapService = ldapService;
     }
-    
-    
+
+
     public void setRequestor( IoSession requestor )
     {
         this.requestor = requestor;
@@ -742,37 +745,36 @@
         if ( unbindItem == null )
         {
             unbindItem = new JMenuItem();
-            unbindItem.setText("Unbind Service");
+            unbindItem.setText( "Unbind Service" );
             unbindItem.setEnabled( isServiceBound );
             unbindItem.addActionListener( new java.awt.event.ActionListener()
             {
                 public void actionPerformed( java.awt.event.ActionEvent e )
                 {
-                    int input = JOptionPane.showConfirmDialog( SessionsFrame.this, 
-                        "Selecting no will send a notice of disconnect ONLY.  " +
-                        "\nSelecting yes will send both.  Cancel will abort unbind.", 
-                        "Send graceful disconnect before disconnect notice?", 
-                        JOptionPane.YES_NO_CANCEL_OPTION );
+                    int input = JOptionPane.showConfirmDialog( SessionsFrame.this,
+                        "Selecting no will send a notice of disconnect ONLY.  "
+                            + "\nSelecting yes will send both.  Cancel will abort unbind.",
+                        "Send graceful disconnect before disconnect notice?", JOptionPane.YES_NO_CANCEL_OPTION );
                     IoAcceptor acceptor = minaRegistry.getAcceptor( ldapService.getTransportType() );
                     List sessions = new ArrayList( acceptor.getManagedSessions( ldapService.getAddress() ) );
-//                    ServerLdapContext ctx;
-//                    try
-//                    {
-//                        ctx = ( ServerLdapContext ) SessionRegistry.getSingleton()
-//                            .getLdapContext( requestor, null, false );
-//                    }
-//                    catch ( NamingException ne )
-//                    {
-//                        JOptionPane.showInternalMessageDialog( SessionsFrame.this, 
-//                            ne.getMessage(), "Encountered an Error", JOptionPane.ERROR_MESSAGE );
-//                        log.warn( "Could not access requestor's context.", ne );
-//                        return;
-//                    }
-//                    DirectoryService service = ctx.getService();
-//                    StartupConfiguration cfg = service.getConfiguration().getStartupConfiguration();
+                    //                    ServerLdapContext ctx;
+                    //                    try
+                    //                    {
+                    //                        ctx = ( ServerLdapContext ) SessionRegistry.getSingleton()
+                    //                            .getLdapContext( requestor, null, false );
+                    //                    }
+                    //                    catch ( NamingException ne )
+                    //                    {
+                    //                        JOptionPane.showInternalMessageDialog( SessionsFrame.this, 
+                    //                            ne.getMessage(), "Encountered an Error", JOptionPane.ERROR_MESSAGE );
+                    //                        log.warn( "Could not access requestor's context.", ne );
+                    //                        return;
+                    //                    }
+                    //                    DirectoryService service = ctx.getService();
+                    //                    StartupConfiguration cfg = service.getConfiguration().getStartupConfiguration();
                     // might add an exit vm feature using the default from the 
                     // configuration property
-                    
+
                     if ( input == JOptionPane.CANCEL_OPTION )
                     {
                         return;
@@ -783,10 +785,10 @@
                         minaRegistry.unbind( ldapService );
                         isServiceBound = false;
                         unbindItem.setEnabled( isServiceBound );
-                        bindItem.setEnabled( ! isServiceBound );
-                        JOptionPane.showMessageDialog( SessionsFrame.this, "Ldap service for " + 
-                            ldapService.getAddress() + " has been successfully unbound.", 
-                            "Success!", JOptionPane.INFORMATION_MESSAGE );
+                        bindItem.setEnabled( !isServiceBound );
+                        JOptionPane.showMessageDialog( SessionsFrame.this, "Ldap service for "
+                            + ldapService.getAddress() + " has been successfully unbound.", "Success!",
+                            JOptionPane.INFORMATION_MESSAGE );
                         refresh();
                         return;
                     }
@@ -796,16 +798,15 @@
                         setCenteredPosition( SessionsFrame.this, dialog );
                         dialog.setModal( true );
                         dialog.setVisible( true );
-                        
 
                         if ( dialog.isSendCanceled() )
                         {
                             log.debug( "GracefulShutdown was canceled." );
-                            JOptionPane.showMessageDialog( SessionsFrame.this, "Shutdown has been canceled.", 
+                            JOptionPane.showMessageDialog( SessionsFrame.this, "Shutdown has been canceled.",
                                 "Graceful Shutdown Aborted", JOptionPane.OK_OPTION );
                             return;
                         }
-                        
+
                         log.debug( "GracefulShutdown parameters captured." );
                         int timeOffline = dialog.getTimeOffline();
                         int delay = dialog.getDelay();
@@ -814,8 +815,8 @@
                         minaRegistry.unbind( ldapService );
                         isServiceBound = false;
                         unbindItem.setEnabled( isServiceBound );
-                        bindItem.setEnabled( ! isServiceBound ); 
-                        
+                        bindItem.setEnabled( !isServiceBound );
+
                         // do progress dialog with bypass button to wait for delay time
                         if ( delay > 0 )
                         {
@@ -827,12 +828,12 @@
                             t.start();
                             progress.setVisible( true );
                         }
-                        
+
                         // now send the notice of disconnect
                         GracefulShutdownHandler.sendNoticeOfDisconnect( sessions, requestor );
-                        JOptionPane.showMessageDialog( SessionsFrame.this, "Ldap service for " + 
-                            ldapService.getAddress() + " has been successfully unbound.", 
-                            "Success!", JOptionPane.OK_OPTION );
+                        JOptionPane.showMessageDialog( SessionsFrame.this, "Ldap service for "
+                            + ldapService.getAddress() + " has been successfully unbound.", "Success!",
+                            JOptionPane.OK_OPTION );
                         refresh();
                     }
                 }
@@ -841,7 +842,7 @@
         return unbindItem;
     }
 
-    
+
     private void setCenteredPosition( JFrame frame, Component comp )
     {
         Point pt = new Point();
@@ -849,9 +850,9 @@
         Dimension screenSize = tk.getScreenSize();
         pt.x = ( screenSize.width - frame.getWidth() ) / 2;
         pt.y = ( screenSize.height - frame.getHeight() ) / 2;
-        
-        pt.x += ( frame.getWidth() - comp.getWidth() )/2;
-        pt.y += ( frame.getHeight() - comp.getHeight() )/2;
+
+        pt.x += ( frame.getWidth() - comp.getWidth() ) / 2;
+        pt.y += ( frame.getHeight() - comp.getHeight() ) / 2;
         comp.setLocation( pt );
     }
 
@@ -866,31 +867,30 @@
         if ( bindItem == null )
         {
             bindItem = new JMenuItem();
-            bindItem.setText("Bind Service");
+            bindItem.setText( "Bind Service" );
             unbindItem.setEnabled( !isServiceBound );
             bindItem.addActionListener( new java.awt.event.ActionListener()
+            {
+                public void actionPerformed( java.awt.event.ActionEvent e )
                 {
-                    public void actionPerformed( java.awt.event.ActionEvent e )
+                    try
                     {
-                        try
-                        {
-                            minaRegistry.bind( ldapService, getLdapProvider() );
-                            JOptionPane.showMessageDialog( SessionsFrame.this, 
-                                "Ldap service " + ldapService.getAddress() + " has been successfully bound.\n"
-                                + " Clients may now connect to the server once again.", 
-                                "Success!", JOptionPane.INFORMATION_MESSAGE );  
-                            isServiceBound = true;
-                            unbindItem.setEnabled( isServiceBound );
-                            bindItem.setEnabled( ! isServiceBound );
-                        }
-                        catch ( IOException e1 )
-                        {
-                            log.error( "failed to rebind ldap service", e1 );
-                            JOptionPane.showMessageDialog( SessionsFrame.this, e1.getMessage(), "Error encountered!", 
-                                JOptionPane.ERROR_MESSAGE );
-                        }
+                        minaRegistry.bind( ldapService, getLdapProvider() );
+                        JOptionPane.showMessageDialog( SessionsFrame.this, "Ldap service " + ldapService.getAddress()
+                            + " has been successfully bound.\n" + " Clients may now connect to the server once again.",
+                            "Success!", JOptionPane.INFORMATION_MESSAGE );
+                        isServiceBound = true;
+                        unbindItem.setEnabled( isServiceBound );
+                        bindItem.setEnabled( !isServiceBound );
                     }
-                });
+                    catch ( IOException e1 )
+                    {
+                        log.error( "failed to rebind ldap service", e1 );
+                        JOptionPane.showMessageDialog( SessionsFrame.this, e1.getMessage(), "Error encountered!",
+                            JOptionPane.ERROR_MESSAGE );
+                    }
+                }
+            } );
         }
         return bindItem;
     }
@@ -906,4 +906,4 @@
     {
         return ldapProvider;
     }
-}  //  @jve:decl-index=0:visual-constraint="10,10"
+} //  @jve:decl-index=0:visual-constraint="10,10"

Propchange: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/SessionsFrame.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/SessionsModel.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/SessionsModel.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/SessionsModel.java (original)
+++ directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/SessionsModel.java Sun Feb 19 19:57:02 2006
@@ -11,75 +11,87 @@
 
 public class SessionsModel implements TableModel
 {
-    final String[] columns = new String[] { "client address", "client port", "server address", "server port" };
-    final Class[] columnClasses = new Class[] { String.class, Integer.class, String.class, Integer.class };
+    final String[] columns = new String[]
+        { "client address", "client port", "server address", "server port" };
+    final Class[] columnClasses = new Class[]
+        { String.class, Integer.class, String.class, Integer.class };
     final IoSession[] sessions;
 
-    
-    SessionsModel( IoSession[] sessions )
+
+    SessionsModel(IoSession[] sessions)
     {
         this.sessions = sessions;
     }
 
+
     IoSession getIoSession( int row )
     {
         return sessions[row];
     }
-    
+
+
     public int getRowCount()
     {
         return sessions.length;
     }
 
+
     public int getColumnCount()
     {
         return columns.length;
     }
 
+
     public String getColumnName( int columnIndex )
     {
         return columns[columnIndex];
     }
 
+
     public Class getColumnClass( int columnIndex )
     {
         return columnClasses[columnIndex];
     }
 
+
     public boolean isCellEditable( int rowIndex, int columnIndex )
     {
         return false;
     }
 
+
     public Object getValueAt( int rowIndex, int columnIndex )
     {
         IoSession session = sessions[rowIndex];
-        
-        switch( columnIndex )
+
+        switch ( columnIndex )
         {
-            case( 0 ):
+            case ( 0 ):
                 return ( ( InetSocketAddress ) session.getRemoteAddress() ).getHostName();
-            case( 1 ):
+            case ( 1 ):
                 return new Integer( ( ( InetSocketAddress ) session.getRemoteAddress() ).getPort() );
-            case( 2 ):
+            case ( 2 ):
                 return ( ( InetSocketAddress ) session.getLocalAddress() ).getHostName();
-            case( 3 ):
+            case ( 3 ):
                 return new Integer( ( ( InetSocketAddress ) session.getLocalAddress() ).getPort() );
             default:
                 throw new IndexOutOfBoundsException( "column index max is " + ( columns.length - 1 ) );
         }
     }
 
-    public void setValueAt(Object aValue, int rowIndex, int columnIndex)
+
+    public void setValueAt( Object aValue, int rowIndex, int columnIndex )
     {
         throw new UnsupportedOperationException();
     }
 
-    public void addTableModelListener(TableModelListener l)
+
+    public void addTableModelListener( TableModelListener l )
     {
     }
 
-    public void removeTableModelListener(TableModelListener l)
+
+    public void removeTableModelListener( TableModelListener l )
     {
     }
 }

Propchange: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/SessionsModel.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/ShutdownDialog.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/ShutdownDialog.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/ShutdownDialog.java (original)
+++ directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/ShutdownDialog.java Sun Feb 19 19:57:02 2006
@@ -29,7 +29,7 @@
     private JTextField delayField = null;
     private boolean canceled = true;
 
-    
+
     /**
      * This is the default constructor
      */
@@ -39,30 +39,30 @@
         initialize();
     }
 
-    
+
     public boolean isSendCanceled()
     {
         return canceled;
     }
-    
-    
+
+
     public int getTimeOffline()
     {
         return Integer.parseInt( timeOfflineField.getText() );
     }
-    
+
 
     public int getDelay()
     {
         return Integer.parseInt( delayField.getText() );
     }
-    
-    
+
+
     public boolean isCanceled()
     {
         return canceled;
     }
-    
+
 
     /**
      * This method initializes this
@@ -71,8 +71,8 @@
      */
     private void initialize()
     {
-        this.setSize(248, 171);
-        this.setTitle("Shutdown Parameters");
+        this.setSize( 248, 171 );
+        this.setTitle( "Shutdown Parameters" );
         this.setContentPane( getJContentPane() );
     }
 
@@ -88,8 +88,8 @@
         {
             jContentPane = new JPanel();
             jContentPane.setLayout( new BorderLayout() );
-            jContentPane.add(getJPanel(), java.awt.BorderLayout.CENTER);
-            jContentPane.add(getJPanel2(), java.awt.BorderLayout.SOUTH);
+            jContentPane.add( getJPanel(), java.awt.BorderLayout.CENTER );
+            jContentPane.add( getJPanel2(), java.awt.BorderLayout.SOUTH );
         }
         return jContentPane;
     }
@@ -105,10 +105,11 @@
         if ( inputsPanel == null )
         {
             inputsPanel = new JPanel();
-            inputsPanel.setLayout(null);
-            inputsPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED));
-            inputsPanel.add(getJPanel3(), null);
-            inputsPanel.add(getJPanel1(), null);
+            inputsPanel.setLayout( null );
+            inputsPanel.setBorder( javax.swing.BorderFactory
+                .createEtchedBorder( javax.swing.border.EtchedBorder.RAISED ) );
+            inputsPanel.add( getJPanel3(), null );
+            inputsPanel.add( getJPanel1(), null );
         }
         return inputsPanel;
     }
@@ -124,8 +125,8 @@
         if ( buttonsPanel == null )
         {
             buttonsPanel = new JPanel();
-            buttonsPanel.add(getJButton(), null);
-            buttonsPanel.add(getJButton2(), null);
+            buttonsPanel.add( getJButton(), null );
+            buttonsPanel.add( getJButton2(), null );
         }
         return buttonsPanel;
     }
@@ -141,7 +142,7 @@
         if ( sendButton == null )
         {
             sendButton = new JButton();
-            sendButton.setText("Send");
+            sendButton.setText( "Send" );
             sendButton.addActionListener( new java.awt.event.ActionListener()
             {
                 public void actionPerformed( java.awt.event.ActionEvent e )
@@ -158,7 +159,7 @@
                             return;
                         }
                     }
-                    catch( NumberFormatException nfe )
+                    catch ( NumberFormatException nfe )
                     {
                         JOptionPane.showMessageDialog( ShutdownDialog.this,
                             "The value for Time Offline is not a number", "Not a Number", JOptionPane.ERROR_MESSAGE );
@@ -171,16 +172,16 @@
                         delay = Integer.parseInt( delayField.getText() );
                         if ( delay > 86400 || delay < 0 )
                         {
-                            JOptionPane.showMessageDialog( ShutdownDialog.this,
-                                "Delay is out of range: 0 ... 86400", "Range Problem", JOptionPane.ERROR_MESSAGE );
+                            JOptionPane.showMessageDialog( ShutdownDialog.this, "Delay is out of range: 0 ... 86400",
+                                "Range Problem", JOptionPane.ERROR_MESSAGE );
                             delayField.setText( "" );
                             return;
                         }
                     }
-                    catch( NumberFormatException nfe )
+                    catch ( NumberFormatException nfe )
                     {
-                        JOptionPane.showMessageDialog( ShutdownDialog.this,
-                            "Delay is not a number", "Not a Number", JOptionPane.ERROR_MESSAGE );
+                        JOptionPane.showMessageDialog( ShutdownDialog.this, "Delay is not a number", "Not a Number",
+                            JOptionPane.ERROR_MESSAGE );
                         delayField.setText( "" );
                         return;
                     }
@@ -204,8 +205,8 @@
         if ( cancelButton == null )
         {
             cancelButton = new JButton();
-            cancelButton.setText("Cancel");
-            cancelButton.setSelected(true);
+            cancelButton.setText( "Cancel" );
+            cancelButton.setSelected( true );
             cancelButton.addActionListener( new java.awt.event.ActionListener()
             {
                 public void actionPerformed( java.awt.event.ActionEvent e )
@@ -231,12 +232,12 @@
         if ( jPanel == null )
         {
             jLabel = new JLabel();
-            jLabel.setText("Minutes Offline: ");
+            jLabel.setText( "Minutes Offline: " );
             jPanel = new JPanel();
-            jPanel.setLayout(new BoxLayout(getJPanel3(), BoxLayout.X_AXIS));
-            jPanel.setBounds(new java.awt.Rectangle(35,28,163,16));
-            jPanel.add(jLabel, null);
-            jPanel.add(getJTextField(), null);
+            jPanel.setLayout( new BoxLayout( getJPanel3(), BoxLayout.X_AXIS ) );
+            jPanel.setBounds( new java.awt.Rectangle( 35, 28, 163, 16 ) );
+            jPanel.add( jLabel, null );
+            jPanel.add( getJTextField(), null );
         }
         return jPanel;
     }
@@ -252,12 +253,12 @@
         if ( jPanel1 == null )
         {
             jLabel1 = new JLabel();
-            jLabel1.setText("Seconds Delay: ");
+            jLabel1.setText( "Seconds Delay: " );
             jPanel1 = new JPanel();
-            jPanel1.setLayout(new BoxLayout(getJPanel1(), BoxLayout.X_AXIS));
-            jPanel1.setBounds(new java.awt.Rectangle(42,57,156,16));
-            jPanel1.add(jLabel1, null);
-            jPanel1.add(getJTextField1(), null);
+            jPanel1.setLayout( new BoxLayout( getJPanel1(), BoxLayout.X_AXIS ) );
+            jPanel1.setBounds( new java.awt.Rectangle( 42, 57, 156, 16 ) );
+            jPanel1.add( jLabel1, null );
+            jPanel1.add( getJTextField1(), null );
         }
         return jPanel1;
     }
@@ -292,4 +293,4 @@
         return delayField;
     }
 
-}  //  @jve:decl-index=0:visual-constraint="10,10"
+} //  @jve:decl-index=0:visual-constraint="10,10"

Propchange: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/ShutdownDialog.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/ShutdownDialog.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/ShutdownProgress.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/ShutdownProgress.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/ShutdownProgress.java (original)
+++ directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/ShutdownProgress.java Sun Feb 19 19:57:02 2006
@@ -19,14 +19,14 @@
     private JProgressBar jProgressBar = null;
     private long timeMillis = 0;
     private boolean bypass = false;
-    
-    
+
+
     public void setTime( long millis )
     {
         this.timeMillis = millis;
     }
-    
-    
+
+
     public void run()
     {
         setCursor( Cursor.getPredefinedCursor( Cursor.WAIT_CURSOR ) );
@@ -36,7 +36,7 @@
         jProgressBar.setValue( 0 );
         jProgressBar.setStringPainted( true );
         final long startTime = System.currentTimeMillis();
-        while ( System.currentTimeMillis() - startTime < timeMillis && ! bypass )
+        while ( System.currentTimeMillis() - startTime < timeMillis && !bypass )
         {
             try
             {
@@ -47,17 +47,18 @@
                 // TODO Auto-generated catch block
                 e.printStackTrace();
             }
-            jProgressBar.setString( ( timeMillis - ( System.currentTimeMillis() - startTime ) )/1000 + " seconds remaining ..." );
+            jProgressBar.setString( ( timeMillis - ( System.currentTimeMillis() - startTime ) ) / 1000
+                + " seconds remaining ..." );
             jProgressBar.setValue( jProgressBar.getValue() + 100 );
             this.repaint();
         }
-        
+
         setCursor( null );
         setVisible( false );
         dispose();
     }
-    
-    
+
+
     /**
      * This is the default constructor
      */
@@ -75,11 +76,11 @@
      */
     private void initialize()
     {
-        this.setSize(300, 104);
+        this.setSize( 300, 104 );
         this.setContentPane( getJContentPane() );
     }
 
-    
+
     /**
      * This method initializes jContentPane
      * 
@@ -91,8 +92,8 @@
         {
             jContentPane = new JPanel();
             jContentPane.setLayout( new BorderLayout() );
-            jContentPane.add(getJPanel(), java.awt.BorderLayout.SOUTH);
-            jContentPane.add(getJProgressBar(), java.awt.BorderLayout.CENTER);
+            jContentPane.add( getJPanel(), java.awt.BorderLayout.SOUTH );
+            jContentPane.add( getJProgressBar(), java.awt.BorderLayout.CENTER );
         }
         return jContentPane;
     }
@@ -108,7 +109,7 @@
         if ( jPanel == null )
         {
             jPanel = new JPanel();
-            jPanel.add(getJButton(), null);
+            jPanel.add( getJButton(), null );
         }
         return jPanel;
     }
@@ -124,8 +125,8 @@
         if ( jButton == null )
         {
             jButton = new JButton();
-            jButton.setText("Bypass Delay");
-            jButton.setText("Bypass Delay");
+            jButton.setText( "Bypass Delay" );
+            jButton.setText( "Bypass Delay" );
             jButton.addActionListener( new java.awt.event.ActionListener()
             {
                 public void actionPerformed( java.awt.event.ActionEvent e )
@@ -152,4 +153,4 @@
         return jProgressBar;
     }
 
-}  //  @jve:decl-index=0:visual-constraint="10,10"
+} //  @jve:decl-index=0:visual-constraint="10,10"

Propchange: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/ShutdownProgress.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/ShutdownProgress.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/AbandonHandler.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/AbandonHandler.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/AbandonHandler.java (original)
+++ directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/AbandonHandler.java Sun Feb 19 19:57:02 2006
@@ -37,6 +37,7 @@
 {
     private static final Logger log = LoggerFactory.getLogger( AbandonHandler.class );
 
+
     public void messageReceived( IoSession session, Object request )
     {
         AbandonRequest req = ( AbandonRequest ) request;
@@ -48,29 +49,30 @@
         }
 
         Request abandonedRequest = SessionRegistry.getSingleton().getOutstandingRequest( session, abandonedId );
-        
+
         if ( abandonedRequest == null )
         {
             if ( log.isWarnEnabled() )
             {
-                log.warn( "Got abandon request from client " + session + " but request must have already " +
-                        "terminated.  Abandon request "+req+" had no effect." );
+                log.warn( "Got abandon request from client " + session + " but request must have already "
+                    + "terminated.  Abandon request " + req + " had no effect." );
             }
             return;
         }
-        
+
         if ( abandonedRequest instanceof AbandonableRequest )
         {
-            log.warn( "Abandon, Bind, Unbind, and StartTLS operations cannot be abandoned.  Abandon request will be ignored." );
+            log
+                .warn( "Abandon, Bind, Unbind, and StartTLS operations cannot be abandoned.  Abandon request will be ignored." );
         }
-        
+
         ( ( AbandonableRequest ) abandonedRequest ).abandon();
         if ( SessionRegistry.getSingleton().removeOutstandingRequest( session, abandonedId ) == null )
         {
             if ( log.isWarnEnabled() )
             {
-                log.warn( "Got abandon request from client " + session + " but request must have already " +
-                        "terminated." );
+                log.warn( "Got abandon request from client " + session + " but request must have already "
+                    + "terminated." );
             }
         }
         else



Mime
View raw message