org.iids.aos.kernel.sunrpc
Class SunRpcDispatcher

java.lang.Object
  extended by org.acplt.oncrpc.server.OncRpcServerStub
      extended by org.iids.aos.kernel.xdr.aosapi_sunrpcServerStub
          extended by org.iids.aos.kernel.sunrpc.SunRpcDispatcher
All Implemented Interfaces:
org.acplt.oncrpc.server.OncRpcDispatchable

public final class SunRpcDispatcher
extends aosapi_sunrpcServerStub

Dispatcher, i.e. server-side skeleton for Sun-RPC. TODO: minimized object allocations for better performance, if possible with multithreaded access.

Author:
arno

Field Summary
static int DEFAULT_SUNRPC_SERVER_MAX_READ_SEG_N
          read_seg_out is 8+n.
static int DEFAULT_SUNRPC_SERVER_MAX_READ_TOC_N
          RPC reply with AUTH_NONE is 24 bytes, read_toc_out is retval (4) + TOC_ENTRY<> is 4+n*536 (536 is size TOC_ENTRY).
static int DEFAULT_SUNRPC_SERVER_MAX_RECV_N
          recv_out is 8+n.
static int DEFAULT_SUNRPC_SERVER_MAX_RPC_MSG_LENGTH
          SERVER: See build/java/org/iids/aos/kernel/xdr/aosapi_sunrpcServerStub.java generated by jrpcgen.
protected  AOSapi kernel
           
protected  java.lang.Thread listenThread
           
protected  long startTime
           
 
Fields inherited from class org.acplt.oncrpc.server.OncRpcServerStub
info, shutdownSignal, transports
 
Constructor Summary
SunRpcDispatcher(AOSapi kernel, int listenPort)
          Creates a new instance of SunRpcDispatcher
 
Method Summary
 accept_out aos_accept_5(accept_in arg1)
           
 close_out aos_close_5(close_in arg1)
           
 connect_out aos_connect_5(connect_in arg1)
           
 create_ac_out aos_create_ac_5(create_ac_in arg1)
           
 create_listen_endpoint_out aos_create_listen_endpoint_5(create_listen_endpoint_in arg1)
           
 create_role_out aos_create_role_5(create_role_in arg1)
           
 create_seg_out aos_create_seg_5(create_seg_in arg1)
           
 delete_ac_out aos_delete_ac_5(delete_ac_in arg1)
           
 delete_listen_endpoint_out aos_delete_listen_endpoint_5(delete_listen_endpoint_in arg1)
           
 delete_role_out aos_delete_role_5(delete_role_in arg1)
           
 delete_seg_out aos_delete_seg_5(delete_seg_in arg1)
           
 finalize_ac_out aos_finalize_ac_5(finalize_ac_in arg1)
           
 get_parm_out aos_get_parm_5(get_parm_in arg1)
           
 make_persistent_out aos_make_persistent_5(make_persistent_in arg1)
           
 peek_out aos_peek_5(peek_in arg1)
           
 prepare_wait_ac_out aos_prepare_wait_ac_5(prepare_wait_ac_in arg1)
           
 read_seg_out aos_read_seg_5(read_seg_in arg1)
           
 read_toc_out aos_read_toc_5(read_toc_in arg1)
           
 recv_out aos_recv_5(recv_in arg1)
           
 reenable_role_out aos_reenable_role_5(reenable_role_in arg1)
           
 select_out aos_select_5(select_in arg1)
           
 send_out aos_send_5(send_in arg1)
           
 ship_ac_out aos_ship_ac_5(ship_ac_in arg1)
           
 wait_ac_out aos_wait_ac_5(wait_ac_in arg1)
           
 write_seg_out aos_write_seg_5(write_seg_in arg1)
           
protected  void finalize()
           
 int getPort()
          Obtain port information of SunRPC dispatcher.
 void shutdown()
           
 
Methods inherited from class org.iids.aos.kernel.xdr.aosapi_sunrpcServerStub
dispatchOncRpcCall
 
Methods inherited from class org.acplt.oncrpc.server.OncRpcServerStub
close, getCharacterEncoding, register, run, run, setCharacterEncoding, stopRpcProcessing, unregister
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_SUNRPC_SERVER_MAX_RPC_MSG_LENGTH

public static final int DEFAULT_SUNRPC_SERVER_MAX_RPC_MSG_LENGTH
SERVER: See build/java/org/iids/aos/kernel/xdr/aosapi_sunrpcServerStub.java generated by jrpcgen.

See Also:
Constant Field Values

DEFAULT_SUNRPC_SERVER_MAX_READ_TOC_N

public static final int DEFAULT_SUNRPC_SERVER_MAX_READ_TOC_N
RPC reply with AUTH_NONE is 24 bytes, read_toc_out is retval (4) + TOC_ENTRY<> is 4+n*536 (536 is size TOC_ENTRY). For a max send buffer size of 32768, this gives a max for n of 61.

See Also:
Constant Field Values

DEFAULT_SUNRPC_SERVER_MAX_READ_SEG_N

public static final int DEFAULT_SUNRPC_SERVER_MAX_READ_SEG_N
read_seg_out is 8+n. For a max send buffer size of 32768, this gives a max for n of 32740. MUST BE MULTIPLE OF 4 TO PREVENT PADDING SURPISES!

See Also:
Constant Field Values

DEFAULT_SUNRPC_SERVER_MAX_RECV_N

public static final int DEFAULT_SUNRPC_SERVER_MAX_RECV_N
recv_out is 8+n. For a max send buffer size of 32768, this gives a max for n of 32740. Also used for peek(). MUST BE MULTIPLE OF 4 TO PREVENT PADDING SURPISES!

See Also:
Constant Field Values

kernel

protected AOSapi kernel

listenThread

protected java.lang.Thread listenThread

startTime

protected long startTime
Constructor Detail

SunRpcDispatcher

public SunRpcDispatcher(AOSapi kernel,
                        int listenPort)
                 throws org.acplt.oncrpc.OncRpcException,
                        java.io.IOException
Creates a new instance of SunRpcDispatcher

Throws:
org.acplt.oncrpc.OncRpcException
java.io.IOException
Method Detail

getPort

public int getPort()
Obtain port information of SunRPC dispatcher. This call may block for a short period, waiting for the transports to come up.

Returns:
The TCP/UDP port number on which the dispatcher is running.

finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable

shutdown

public void shutdown()

aos_create_role_5

public create_role_out aos_create_role_5(create_role_in arg1)
Specified by:
aos_create_role_5 in class aosapi_sunrpcServerStub

aos_delete_role_5

public delete_role_out aos_delete_role_5(delete_role_in arg1)
Specified by:
aos_delete_role_5 in class aosapi_sunrpcServerStub

aos_create_ac_5

public create_ac_out aos_create_ac_5(create_ac_in arg1)
Specified by:
aos_create_ac_5 in class aosapi_sunrpcServerStub

aos_prepare_wait_ac_5

public prepare_wait_ac_out aos_prepare_wait_ac_5(prepare_wait_ac_in arg1)
Specified by:
aos_prepare_wait_ac_5 in class aosapi_sunrpcServerStub

aos_wait_ac_5

public wait_ac_out aos_wait_ac_5(wait_ac_in arg1)
Specified by:
aos_wait_ac_5 in class aosapi_sunrpcServerStub

aos_ship_ac_5

public ship_ac_out aos_ship_ac_5(ship_ac_in arg1)
Specified by:
aos_ship_ac_5 in class aosapi_sunrpcServerStub

aos_delete_ac_5

public delete_ac_out aos_delete_ac_5(delete_ac_in arg1)
Specified by:
aos_delete_ac_5 in class aosapi_sunrpcServerStub

aos_read_toc_5

public read_toc_out aos_read_toc_5(read_toc_in arg1)
Specified by:
aos_read_toc_5 in class aosapi_sunrpcServerStub

aos_create_seg_5

public create_seg_out aos_create_seg_5(create_seg_in arg1)
Specified by:
aos_create_seg_5 in class aosapi_sunrpcServerStub

aos_read_seg_5

public read_seg_out aos_read_seg_5(read_seg_in arg1)
Specified by:
aos_read_seg_5 in class aosapi_sunrpcServerStub

aos_write_seg_5

public write_seg_out aos_write_seg_5(write_seg_in arg1)
Specified by:
aos_write_seg_5 in class aosapi_sunrpcServerStub

aos_delete_seg_5

public delete_seg_out aos_delete_seg_5(delete_seg_in arg1)
Specified by:
aos_delete_seg_5 in class aosapi_sunrpcServerStub

aos_make_persistent_5

public make_persistent_out aos_make_persistent_5(make_persistent_in arg1)
Specified by:
aos_make_persistent_5 in class aosapi_sunrpcServerStub

aos_finalize_ac_5

public finalize_ac_out aos_finalize_ac_5(finalize_ac_in arg1)
Specified by:
aos_finalize_ac_5 in class aosapi_sunrpcServerStub

aos_create_listen_endpoint_5

public create_listen_endpoint_out aos_create_listen_endpoint_5(create_listen_endpoint_in arg1)
Specified by:
aos_create_listen_endpoint_5 in class aosapi_sunrpcServerStub

aos_delete_listen_endpoint_5

public delete_listen_endpoint_out aos_delete_listen_endpoint_5(delete_listen_endpoint_in arg1)
Specified by:
aos_delete_listen_endpoint_5 in class aosapi_sunrpcServerStub

aos_accept_5

public accept_out aos_accept_5(accept_in arg1)
Specified by:
aos_accept_5 in class aosapi_sunrpcServerStub

aos_connect_5

public connect_out aos_connect_5(connect_in arg1)
Specified by:
aos_connect_5 in class aosapi_sunrpcServerStub

aos_send_5

public send_out aos_send_5(send_in arg1)
Specified by:
aos_send_5 in class aosapi_sunrpcServerStub

aos_recv_5

public recv_out aos_recv_5(recv_in arg1)
Specified by:
aos_recv_5 in class aosapi_sunrpcServerStub

aos_peek_5

public peek_out aos_peek_5(peek_in arg1)
Specified by:
aos_peek_5 in class aosapi_sunrpcServerStub

aos_close_5

public close_out aos_close_5(close_in arg1)
Specified by:
aos_close_5 in class aosapi_sunrpcServerStub

aos_select_5

public select_out aos_select_5(select_in arg1)
Specified by:
aos_select_5 in class aosapi_sunrpcServerStub

aos_get_parm_5

public get_parm_out aos_get_parm_5(get_parm_in arg1)
Specified by:
aos_get_parm_5 in class aosapi_sunrpcServerStub

aos_reenable_role_5

public reenable_role_out aos_reenable_role_5(reenable_role_in arg1)
Specified by:
aos_reenable_role_5 in class aosapi_sunrpcServerStub


Copyright © 2003, 2004 IIDS Group. All Rights Reserved.