[jboss-remoting-commits] JBoss Remoting SVN: r3520 - in remoting3/trunk: api/src/main/java/org/jboss/cx/remoting/spi/wrapper and 1 other directories.

jboss-remoting-commits at lists.jboss.org jboss-remoting-commits at lists.jboss.org
Tue Feb 26 16:02:40 EST 2008


Author: david.lloyd at jboss.com
Date: 2008-02-26 16:02:40 -0500 (Tue, 26 Feb 2008)
New Revision: 3520

Removed:
   remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/EndpointShutdownListener.java
Modified:
   remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/Context.java
   remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/wrapper/ContextWrapper.java
   remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/CoreEndpoint.java
   remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/CoreOutboundContext.java
Log:
Remove defunct classes and methods

Modified: remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/Context.java
===================================================================
--- remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/Context.java	2008-02-26 20:48:20 UTC (rev 3519)
+++ remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/Context.java	2008-02-26 21:02:40 UTC (rev 3520)
@@ -68,21 +68,4 @@
      */
     ConcurrentMap<Object, Object> getAttributes();
 
-    /**
-     * Get a service client interface.  The context must support the service with the given
-     * client interface.
-     *
-     * @param serviceType the service interface type
-     * @return an instance of the given interface
-     * @throws RemotingException if the service is not valid or is not available
-     */
-    <T> T getService(Class<T> serviceType) throws RemotingException;
-
-    /**
-     * Determine whether this context supports a service with the given client interface.
-     *
-     * @param serviceType the service interface type
-     * @return {@code true} if the given service type is supported
-     */
-    <T> boolean hasService(Class<T> serviceType);
 }

Deleted: remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/EndpointShutdownListener.java
===================================================================
--- remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/EndpointShutdownListener.java	2008-02-26 20:48:20 UTC (rev 3519)
+++ remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/EndpointShutdownListener.java	2008-02-26 21:02:40 UTC (rev 3520)
@@ -1,8 +0,0 @@
-package org.jboss.cx.remoting;
-
-/**
- *
- */
-public interface EndpointShutdownListener {
-    void handleShutdown(Endpoint endpoint);
-}

Modified: remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/wrapper/ContextWrapper.java
===================================================================
--- remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/wrapper/ContextWrapper.java	2008-02-26 20:48:20 UTC (rev 3519)
+++ remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/wrapper/ContextWrapper.java	2008-02-26 21:02:40 UTC (rev 3520)
@@ -45,11 +45,4 @@
         return delegate.getAttributes();
     }
 
-    public <T> T getService(Class<T> serviceType) throws RemotingException {
-        return delegate.getService(serviceType);
-    }
-
-    public <T> boolean hasService(Class<T> serviceType) {
-        return delegate.hasService(serviceType);
-    }
 }

Modified: remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/CoreEndpoint.java
===================================================================
--- remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/CoreEndpoint.java	2008-02-26 20:48:20 UTC (rev 3519)
+++ remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/CoreEndpoint.java	2008-02-26 21:02:40 UTC (rev 3520)
@@ -8,7 +8,6 @@
 import java.util.concurrent.Executor;
 import java.util.concurrent.Executors;
 import org.jboss.cx.remoting.Endpoint;
-import org.jboss.cx.remoting.EndpointShutdownListener;
 import org.jboss.cx.remoting.RemotingException;
 import org.jboss.cx.remoting.Session;
 import org.jboss.cx.remoting.Context;
@@ -66,7 +65,7 @@
     private final ConcurrentMap<String, CoreProtocolRegistration> protocolMap = CollectionUtil.concurrentMap();
     private final Set<CoreSession> sessions = CollectionUtil.synchronizedSet(CollectionUtil.<CoreSession>hashSet());
     // accesses protected by {@code shutdownListeners} - always lock AFTER {@code state}
-    private final List<EndpointShutdownListener> shutdownListeners = CollectionUtil.arrayList();
+    private final List<CloseHandler<Endpoint>> closeHandlers = CollectionUtil.arrayList();
 
     ConcurrentMap<Object, Object> getAttributes() {
         return endpointMap;
@@ -158,26 +157,6 @@
             return endpointMap;
         }
 
-        public void shutdown() {
-            final List<EndpointShutdownListener> listeners;
-            synchronized(state) {
-                if (!state.transition(State.UP, State.DOWN)) {
-                    return;
-                }
-                synchronized(shutdownListeners) {
-                    listeners = CollectionUtil.arrayList(shutdownListeners);
-                    shutdownListeners.clear();
-                }
-            }
-            for (EndpointShutdownListener listener : listeners) {
-                listener.handleShutdown(this);
-            }
-            for (CoreSession coreSession : sessions) {
-                coreSession.shutdown();
-            }
-            sessions.clear();
-        }
-
         public Session openSession(final URI uri, final AttributeMap attributeMap) throws RemotingException {
             final String scheme = uri.getScheme();
             if (scheme == null) {

Modified: remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/CoreOutboundContext.java
===================================================================
--- remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/CoreOutboundContext.java	2008-02-26 20:48:20 UTC (rev 3519)
+++ remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/CoreOutboundContext.java	2008-02-26 21:02:40 UTC (rev 3520)
@@ -196,16 +196,6 @@
         public ConcurrentMap<Object, Object> getAttributes() {
             return contextMap;
         }
-
-        public <T> T getService(final Class<T> serviceType) throws RemotingException {
-            // todo interceptors
-            return null;
-        }
-
-        public <T> boolean hasService(final Class<T> serviceType) {
-            // todo interceptors
-            return false;
-        }
     }
 
     private static final CoreOutboundRequest[] empty = new CoreOutboundRequest[0];




More information about the jboss-remoting-commits mailing list