Package org.teiid.net.socket

Examples of org.teiid.net.socket.ServiceInvocationStruct


        try {
            message.setContents(this.socketClientInstance.getCryptor().unsealObject(message.getContents()));
      if (!(message.getContents() instanceof ServiceInvocationStruct)) {
        throw new AssertionError("unknown message contents"); //$NON-NLS-1$
      }
      final ServiceInvocationStruct serviceStruct = (ServiceInvocationStruct)message.getContents();
      final ClientService clientService = this.csr.getClientService(serviceStruct.targetClass.getName());     
      loggingContext = clientService.getLoggingContext();
      Method m = clientService.getReflectionHelper().findBestMethodOnTarget(serviceStruct.methodName, serviceStruct.args);
      Object methodResult;
      try {
View Full Code Here


      public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        if (LogManager.isMessageToBeRecorded(LogConstants.CTX_ODBC, MessageLevel.TRACE)) {
          LogManager.logTrace(LogConstants.CTX_ODBC, "invoking server method:", method.getName(), Arrays.deepToString(args)); //$NON-NLS-1$
        }
        message = new PGRequest();
        message.struct = new ServiceInvocationStruct(args, method.getName(),ODBCServerRemote.class);
        return null;
      }
    });
  }
View Full Code Here

      ctx.sendDownstream(evt);
            return;
    }
    this.ctx = ctx;
    this.message = me;
    ServiceInvocationStruct serviceStruct = (ServiceInvocationStruct)me.getMessage();

    try {
      Method m = this.clientProxy.findBestMethodOnTarget(serviceStruct.methodName, serviceStruct.args);
      try {
        m.invoke(this, serviceStruct.args);
View Full Code Here

      @Override
      public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        if (LogManager.isMessageToBeRecorded(LogConstants.CTX_ODBC, MessageLevel.TRACE)) {
          LogManager.logTrace(LogConstants.CTX_ODBC, "invoking client method:", method.getName(), Arrays.deepToString(args)); //$NON-NLS-1$
        }
        ServiceInvocationStruct message = new ServiceInvocationStruct(args, method.getName(),ODBCServerRemote.class);
        channel.write(message);
        return null;
      }
    });
    this.server = new ODBCServerRemoteImpl(this, authType, driver) {
View Full Code Here


public class TestServiceInvocationStruct extends TestCase {

    public void testSerialize() throws Exception {
      ServiceInvocationStruct struct = new ServiceInvocationStruct(new Object[] {new Integer(1), "hello"}, "doSomething", TestServiceInvocationStruct.class);
     
        Object serialized = UnitTestUtil.helpSerialize(struct);
        assertNotNull(serialized);
        assertTrue(serialized instanceof ServiceInvocationStruct);
        ServiceInvocationStruct copy = (ServiceInvocationStruct)serialized;
        assertTrue(Arrays.equals(struct.args, copy.args));
        assertEquals(struct.methodName, copy.methodName);
        assertEquals(struct.targetClass, copy.targetClass);
    }
View Full Code Here

TOP

Related Classes of org.teiid.net.socket.ServiceInvocationStruct

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.