org.redkale.net.sncp

## 类 SncpDynServlet.SncpServletAction

- java.lang.Object
- - org.redkale.net.sncp.SncpDynServlet.SncpServletAction

- 封闭类:
    SncpDynServlet

      public abstract static class SncpDynServlet.SncpServletAction
      extends java.lang.Object

- - ### 字段概要

    字段
    限定符和类型 | 字段和说明
    --- | ---
    `protected BsonConvert` | `convert`
    `java.lang.reflect.Method` | `method`
    `protected Attribute[]` | `paramAttrs`
    `protected java.lang.reflect.Type[]` | `paramTypes`

  - ### 构造器概要

    构造器
    构造器和说明
    `SncpServletAction()`

  - ### 方法概要

    所有方法 静态方法 实例方法 抽象方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `void` | `_callParameter(BsonWriter out, java.lang.Object... params)`
    `abstract void` | `action(BsonReader in, BsonWriter out)`
    `static SncpDynServlet.SncpServletAction` | `create(Service service, DLong actionid, java.lang.reflect.Method method)` public class TestService implements Service { public boolean change(TestBean bean, String name, int id) { } } public class DynActionTestService_change extends SncpServletAction { public TestService service; @Override public void action(final BsonReader in, final BsonWriter out) throws Throwable { TestBean arg1 = convert.convertFrom(paramTypes[1], in); String arg2 = convert.convertFrom(paramTypes[2], in); int arg3 = convert.convertFrom(paramTypes[3], in); Object rs = service.change(arg1, arg2, arg3); _callParameter(out, arg1, arg2, arg3); convert.convertTo(out, paramTypes[0], rs); } }

    - ### 从类继承的方法 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 字段详细资料

    - #### method

          public java.lang.reflect.Method method

    - #### convert

          protected BsonConvert convert

    - #### paramAttrs

          protected Attribute[] paramAttrs

    - #### paramTypes

          protected java.lang.reflect.Type[] paramTypes

  - ### 构造器详细资料

    - #### SncpServletAction

          public SncpServletAction()

  - ### 方法详细资料

    - #### action

          public abstract void action(BsonReader in,
                                      BsonWriter out)
                               throws java.lang.Throwable

      抛出:
        `java.lang.Throwable`

    - #### _callParameter

          public final void _callParameter(BsonWriter out,
                                           java.lang.Object... params)

    - #### create

          public static SncpDynServlet.SncpServletAction create(Service service,
                                                                DLong actionid,
                                                                java.lang.reflect.Method method)

      >       public class TestService implements Service {
      >           public boolean change(TestBean bean, String name, int id) {

      >           }
      >       }

      >       public class DynActionTestService_change extends SncpServletAction {

      >           public TestService service;

      >           @Override
      >           public void action(final BsonReader in, final BsonWriter out) throws Throwable {
      >               TestBean arg1 = convert.convertFrom(paramTypes[1], in);
      >               String arg2 = convert.convertFrom(paramTypes[2], in);
      >               int arg3 = convert.convertFrom(paramTypes[3], in);
      >               Object rs = service.change(arg1, arg2, arg3);
      >               _callParameter(out, arg1, arg2, arg3);
      >               convert.convertTo(out, paramTypes[0], rs);
      >           }
      >       }

      参数:
        `service` - Service
        `actionid` - 操作ID
        `method` - 方法
      返回:
        SncpServletAction