Package org.jboss.ejb3.endpoint

Examples of org.jboss.ejb3.endpoint.Endpoint


   }
  
   @Test
   public void testIllegalEndpoint()
   {
      Endpoint endpoint = null;
      Serializable session = null;
      Class<?> invokedBusinessInterface = null;
      try
      {
         new EndpointInvocationHandler(endpoint, session, invokedBusinessInterface);
View Full Code Here


  
   @Test
   public void test1()
   {
      ClassLoader loader = Thread.currentThread().getContextClassLoader();
      Endpoint endpoint = new AbstractEndpoint() {
         public Object invoke(Serializable session, Class<?> invokedBusinessInterface, Method method, Object[] args)
            throws Throwable
         {
            return "Hi " + args[0];
         }
View Full Code Here

  
   @Test
   public void testNoBusinessInterface()
   {
      ClassLoader loader = Thread.currentThread().getContextClassLoader();
      Endpoint endpoint = new AbstractEndpoint() {
         public Object invoke(Serializable session, Class<?> invokedBusinessInterface, Method method, Object[] args)
            throws Throwable
         {
            return "Hi " + args[0];
         }
View Full Code Here

  
   @Test
   public void testEquals() throws Exception
   {
      ClassLoader loader = Thread.currentThread().getContextClassLoader();
      Endpoint endpoint = new SimpleEndpoint();
      Serializable session = null;
      Class<SimpleInterface> businessInterface = SimpleInterface.class;
      SimpleInterface proxy1 = EndpointProxy.newProxyInstance(loader, session, businessInterface, endpoint);
      SimpleInterface proxy2 = EndpointProxy.newProxyInstance(loader, session, businessInterface, endpoint);
      assertTrue(proxy1.equals(proxy2));
View Full Code Here

   }

   @Test
   public void testEqualsDifferentBusinessInterface() throws Exception
   {
      Endpoint endpoint = new SimpleEndpoint();
      Serializable session = UUID.randomUUID();
      Class<SimpleInterface> businessInterface1 = SimpleInterface.class;
      Class<?> businessInterface2 = null;
      InvocationHandler handler1 = new EndpointInvocationHandler(endpoint, session, businessInterface1);
      InvocationHandler handler2 = new EndpointInvocationHandler(endpoint, session, businessInterface2);
View Full Code Here

   }

   @Test
   public void testEqualsDifferentProxyProviders() throws Exception
   {
      Endpoint endpoint = new SimpleEndpoint();
      Serializable session = null;
      Class<SimpleInterface> businessInterface = SimpleInterface.class;
      InvocationHandler handler = new EndpointInvocationHandler(endpoint, session, businessInterface);
     
      ProxyFactory factory = new ProxyFactory();
View Full Code Here

   }

   @Test
   public void testEqualsDifferentSession() throws Exception
   {
      Endpoint endpoint = new SimpleEndpoint();
      Serializable session1 = UUID.randomUUID();
      Serializable session2 = UUID.randomUUID();
      Class<SimpleInterface> businessInterface = null;
      InvocationHandler handler1 = new EndpointInvocationHandler(endpoint, session1, businessInterface);
      InvocationHandler handler2 = new EndpointInvocationHandler(endpoint, session2, businessInterface);
View Full Code Here

   }

   @Test
   public void testEqualsDummyObject() throws Exception
   {
      Endpoint endpoint = new SimpleEndpoint();
      Serializable session = null;
      Class<SimpleInterface> businessInterface = null;
      InvocationHandler handler = new EndpointInvocationHandler(endpoint, session, businessInterface);
      assertFalse(handler.equals(new Object()));
   }
View Full Code Here

   }

   @Test
   public void testEqualsNull() throws Exception
   {
      Endpoint endpoint = new SimpleEndpoint();
      Serializable session = null;
      Class<SimpleInterface> businessInterface = null;
      EndpointInvocationHandler handler = new EndpointInvocationHandler(endpoint, session, businessInterface);
      assertFalse(handler.equals(null));
   }
View Full Code Here

   }

   @Test
   public void testEqualsOtherEndpoint() throws Exception
   {
      Endpoint endpoint1 = new SimpleEndpoint();
      Endpoint endpoint2 = new SimpleEndpoint();
      Serializable session = null;
      Class<SimpleInterface> businessInterface = null;
      InvocationHandler handler1 = new EndpointInvocationHandler(endpoint1, session, businessInterface);
      InvocationHandler handler2 = new EndpointInvocationHandler(endpoint2, session, businessInterface);
      assertFalse(handler1.equals(handler2));
View Full Code Here

TOP

Related Classes of org.jboss.ejb3.endpoint.Endpoint

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.