[jboss-remoting-commits] JBoss Remoting SVN: r4362 - in remoting3/trunk: api/src/main/java/org/jboss/cx/remoting/spi/wrapper and 2 other directories.
jboss-remoting-commits at lists.jboss.org
jboss-remoting-commits at lists.jboss.org
Thu Jul 3 21:44:26 EDT 2008
Author: david.lloyd at jboss.com
Date: 2008-07-03 21:44:26 -0400 (Thu, 03 Jul 2008)
New Revision: 4362
Removed:
remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/Session.java
remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/SessionListener.java
remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/wrapper/SessionWrapper.java
remoting3/trunk/mc-deployers/src/main/java/org/jboss/cx/remoting/beans/SessionBean.java
Modified:
remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/Endpoint.java
remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/wrapper/EndpointWrapper.java
remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/EndpointImpl.java
Log:
Get rid of sessions
Modified: remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/Endpoint.java
===================================================================
--- remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/Endpoint.java 2008-07-04 01:41:32 UTC (rev 4361)
+++ remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/Endpoint.java 2008-07-04 01:44:26 UTC (rev 4362)
@@ -51,18 +51,4 @@
* @return the context source
*/
<I, O> RemoteServiceEndpoint<I, O> createService(RequestListener<I, O> requestListener) throws RemotingException;
-
- /**
- * Add a listener that is notified when a session is created.
- *
- * @param sessionListener the session listener
- */
- void addSessionListener(SessionListener sessionListener);
-
- /**
- * Remove a previously added session listener.
- *
- * @param sessionListener the session listener
- */
- void removeSessionListener(SessionListener sessionListener);
}
Deleted: remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/Session.java
===================================================================
--- remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/Session.java 2008-07-04 01:41:32 UTC (rev 4361)
+++ remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/Session.java 2008-07-04 01:44:26 UTC (rev 4362)
@@ -1,48 +0,0 @@
-package org.jboss.cx.remoting;
-
-import java.util.concurrent.ConcurrentMap;
-
-/**
- * Represents a point-to-point relationship with another endpoint.
- * <p/>
- * An open session may be associated with one or more connections, or it may be connectionless (e.g. UDP).
- * <p/>
- * A session may be shared safely among multiple threads.
- */
-public interface Session extends Closeable<Session> {
- /**
- * Close this session. Any associated connection(s) will be closed. Calling this method multiple times has no
- * effect.
- */
- void close() throws RemotingException;
-
- /**
- * Get the session map.
- *
- * @return the session map
- */
- ConcurrentMap<Object, Object> getAttributes();
-
- /**
- * Get the name of the associated local endpoint, if any.
- *
- * @return the name, or {@code null} if the local endpoint is anonymous
- */
- String getLocalEndpointName();
-
- /**
- * Get the name of the associated remote endpoint, if any.
- *
- * @return the name, or {@code null} if the remote endpoint is anonymous
- */
- String getRemoteEndpointName();
-
- /**
- * Get the root client for this session.
- *
- * @param <I> the request type
- * @param <O> the reply type
- * @return the root client
- */
- <I, O> Client<I, O> getRootClient();
-}
Deleted: remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/SessionListener.java
===================================================================
--- remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/SessionListener.java 2008-07-04 01:41:32 UTC (rev 4361)
+++ remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/SessionListener.java 2008-07-04 01:44:26 UTC (rev 4362)
@@ -1,14 +0,0 @@
-package org.jboss.cx.remoting;
-
-/**
- * A session listener. Called when a session is opened on an endpoint.
- */
-public interface SessionListener {
-
- /**
- * Receive notification that the session was opened.
- *
- * @param session the new session
- */
- void handleSessionOpened(Session session);
-}
Modified: remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/wrapper/EndpointWrapper.java
===================================================================
--- remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/wrapper/EndpointWrapper.java 2008-07-04 01:41:32 UTC (rev 4361)
+++ remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/wrapper/EndpointWrapper.java 2008-07-04 01:44:26 UTC (rev 4362)
@@ -1,17 +1,11 @@
package org.jboss.cx.remoting.spi.wrapper;
-import java.net.URI;
import java.util.concurrent.ConcurrentMap;
-import org.jboss.cx.remoting.Client;
-import org.jboss.cx.remoting.ClientSource;
import org.jboss.cx.remoting.Endpoint;
import org.jboss.cx.remoting.RemotingException;
import org.jboss.cx.remoting.RequestListener;
-import org.jboss.cx.remoting.Session;
-import org.jboss.cx.remoting.SessionListener;
import org.jboss.cx.remoting.spi.remote.RemoteClientEndpoint;
import org.jboss.cx.remoting.spi.remote.RemoteServiceEndpoint;
-import org.jboss.cx.remoting.util.AttributeMap;
/**
* A simple delegating wrapper for endpoints.
@@ -55,18 +49,4 @@
public <I, O> RemoteServiceEndpoint<I, O> createService(final RequestListener<I, O> requestListener) throws RemotingException {
return delegate.createService(requestListener);
}
-
- /**
- * {@inheritDoc} This implementation calls the same method on the delegate object.
- */
- public void addSessionListener(final SessionListener sessionListener) {
- delegate.addSessionListener(sessionListener);
- }
-
- /**
- * {@inheritDoc} This implementation calls the same method on the delegate object.
- */
- public void removeSessionListener(final SessionListener sessionListener) {
- delegate.removeSessionListener(sessionListener);
- }
}
Deleted: remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/wrapper/SessionWrapper.java
===================================================================
--- remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/wrapper/SessionWrapper.java 2008-07-04 01:41:32 UTC (rev 4361)
+++ remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/wrapper/SessionWrapper.java 2008-07-04 01:44:26 UTC (rev 4362)
@@ -1,69 +0,0 @@
-package org.jboss.cx.remoting.spi.wrapper;
-
-import java.util.concurrent.ConcurrentMap;
-import org.jboss.cx.remoting.CloseHandler;
-import org.jboss.cx.remoting.Client;
-import org.jboss.cx.remoting.RemotingException;
-import org.jboss.cx.remoting.Session;
-
-/**
- * A simple delegating wrapper for clients.
- */
-public class SessionWrapper implements Session {
- protected final Session delegate;
-
- /**
- * Construct a new instance. Calls will be sent to the given {@code delegate} by default.
- *
- * @param delegate the delegate client instance
- */
- protected SessionWrapper(final Session delegate) {
- this.delegate = delegate;
- }
-
- /**
- * {@inheritDoc} This implementation calls the same method on the delegate object.
- */
- public void close() throws RemotingException {
- delegate.close();
- }
-
- /**
- * {@inheritDoc} This implementation calls the same method on the delegate object.
- */
- public void addCloseHandler(final CloseHandler<Session> closeHandler) {
- delegate.addCloseHandler(new CloseHandler<Session>() {
- public void handleClose(final Session closed) {
- closeHandler.handleClose(SessionWrapper.this);
- }
- });
- }
-
- /**
- * {@inheritDoc} This implementation calls the same method on the delegate object.
- */
- public ConcurrentMap<Object, Object> getAttributes() {
- return delegate.getAttributes();
- }
-
- /**
- * {@inheritDoc} This implementation calls the same method on the delegate object.
- */
- public String getLocalEndpointName() {
- return delegate.getLocalEndpointName();
- }
-
- /**
- * {@inheritDoc} This implementation calls the same method on the delegate object.
- */
- public String getRemoteEndpointName() {
- return delegate.getRemoteEndpointName();
- }
-
- /**
- * {@inheritDoc} This implementation calls the same method on the delegate object.
- */
- public <I, O> Client<I, O> getRootClient() {
- return delegate.getRootClient();
- }
-}
Modified: remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/EndpointImpl.java
===================================================================
--- remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/EndpointImpl.java 2008-07-04 01:41:32 UTC (rev 4361)
+++ remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/EndpointImpl.java 2008-07-04 01:44:26 UTC (rev 4362)
@@ -1,14 +1,11 @@
package org.jboss.cx.remoting.core;
-import java.util.LinkedHashSet;
-import java.util.Set;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import org.jboss.cx.remoting.Endpoint;
import org.jboss.cx.remoting.RequestListener;
-import org.jboss.cx.remoting.SessionListener;
import org.jboss.cx.remoting.RemotingException;
import org.jboss.cx.remoting.core.util.OrderedExecutorFactory;
import org.jboss.cx.remoting.spi.remote.RemoteClientEndpoint;
@@ -42,7 +39,6 @@
private String name;
private final AtomicStateMachine<State> state = AtomicStateMachine.start(State.INITIAL);
- private final Set<SessionListener> sessionListeners = CollectionUtil.synchronizedSet(new LinkedHashSet<SessionListener>());
private OrderedExecutorFactory orderedExecutorFactory;
private ExecutorService executorService;
@@ -117,14 +113,4 @@
serviceEndpoint.open();
return serviceEndpoint;
}
-
- public void addSessionListener(final SessionListener sessionListener) {
- // TODO security check
- sessionListeners.add(sessionListener);
- }
-
- public void removeSessionListener(final SessionListener sessionListener) {
- // TODO security check
- sessionListeners.remove(sessionListener);
- }
}
Deleted: remoting3/trunk/mc-deployers/src/main/java/org/jboss/cx/remoting/beans/SessionBean.java
===================================================================
--- remoting3/trunk/mc-deployers/src/main/java/org/jboss/cx/remoting/beans/SessionBean.java 2008-07-04 01:41:32 UTC (rev 4361)
+++ remoting3/trunk/mc-deployers/src/main/java/org/jboss/cx/remoting/beans/SessionBean.java 2008-07-04 01:44:26 UTC (rev 4362)
@@ -1,60 +0,0 @@
-package org.jboss.cx.remoting.beans;
-
-import java.net.URI;
-import org.jboss.cx.remoting.util.AttributeMap;
-import org.jboss.cx.remoting.Endpoint;
-import org.jboss.cx.remoting.RemotingException;
-import org.jboss.cx.remoting.Session;
-
-/**
- *
- */
-public final class SessionBean {
- private URI destination;
- private AttributeMap attributeMap;
- private Endpoint endpoint;
-
- public URI getDestination() {
- return destination;
- }
-
- public void setDestination(final URI destination) {
- this.destination = destination;
- }
-
- public AttributeMap getAttributeMap() {
- return attributeMap;
- }
-
- public void setAttributeMap(final AttributeMap attributeMap) {
- this.attributeMap = attributeMap;
- }
-
- public Endpoint getEndpoint() {
- return endpoint;
- }
-
- public void setEndpoint(final Endpoint endpoint) {
- this.endpoint = endpoint;
- }
-
- // lifecycle
-
- private Session session;
-
- public void create() {
-
- }
-
- public void start() throws RemotingException {
-// session = endpoint.openSession(destination, attributeMap, null);
- }
-
- public void stop() throws RemotingException {
- session.close();
- }
-
- public void destroy() {
-
- }
-}
More information about the jboss-remoting-commits
mailing list