package Ġorg . gob lin framework . remote . server . invocation Ċ Ċ import Ġorg . gob lin framework . core . service . G ob lin Managed Bean Ċ import Ġorg . gob lin framework . core . service . G ob lin Managed Logger Ċ import Ġorg . gob lin framework . core . service . G ob lin ManagedObject Ċ import Ġorg . gob lin framework . core . service . Service Installer Ċ import Ġorg . gob lin framework . remote . server . invocation . endpoint . Rpc Server Invocation Endpoint Ċ import Ġorg . gob lin framework . remote . server . invocation . filter . Loc ate Method Filter Ċ import Ġorg . gob lin framework . remote . server . invocation . filter . Loc ate Service Filter Ċ import Ġorg . gob lin framework . remote . server . invocation . filter . Resolve Argument Filter Ċ import Ġorg . gob lin framework . remote . server . invocation . filter . Send Response Filter Ċ Ċ @ G ob lin Managed Bean (" Remote Server ") Ċ @ G ob lin Managed Logger (" gob lin . remote . server . invocation ") Ċ class ĠRemote Server Filter Manager Ġprivate Ġconstructor () ĊĠ Ġ: ĠG ob lin ManagedObject (), ĠRemote Server Filter Manager MX Bean Ġ{ ĊĊĠ Ġcompanion Ġobject Ġ{ ĊĠĠĠ Ġ@ Jvm Field Ġval ĠINSTANCE Ġ= ĠRemote Server Filter Manager () ĊĠ Ġ} ĊĊĠ Ġprivate Ġval Ġcustomized Ġ= Ġmutable ListOf < Rpc Server Filter Deleg ator >() ĊĊĠ Ġinit Ġ{ ĊĠĠĠ ĠService Installer . asList ( Rpc Server Filter :: class . java ) ĊĠĠĠĠĠĠĠ Ġ. map Ġ{ ĠRpc Server Filter Deleg ator ( it ) Ġ} ĊĠĠĠĠĠĠĠ Ġ. sorted By Ġ{ Ġit . order Ġ} ĊĠĠĠĠĠĠĠ Ġ. forEach Ġ{ Ġcustomized . add ( it ) Ġ} ĊĠ Ġ} ĊĊĠ Ġfun Ġcreate FilterChain (): ĠRpc Server FilterChain Ġ{ ĊĠĠĠ Ġval Ġfilters Ġ= Ġmutable ListOf < Rpc Server Filter >() ĊĠĠĠ Ġfilters . add ( Send Response Filter . INSTANCE ) ĊĠĠĠ Ġfilters . add ( Loc ate Service Filter . INSTANCE ) ĊĠĠĠ Ġfilters . add ( Loc ate Method Filter . INSTANCE ) ĊĠĠĠ Ġfilters . add ( Resolve Argument Filter . INSTANCE ) ĊĠĠĠ Ġfilters . addAll ( custom ized ) ĊĠĠĠ Ġfilters . add ( Rpc Server Invocation Endpoint . INSTANCE ) ĊĠĠĠ Ġreturn ĠRpc Server FilterChain Impl ( filters ) ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġdispose Bean () Ġ{ ĊĠĠĠ ĠRpc Server Invocation Endpoint . INSTANCE . dispose () ĊĠĠĠ Ġcustomized . sorted By Descending Ġ{ Ġit . order Ġ}. forEach Ġ{ Ġit . dispose () Ġ} ĊĠĠĠ ĠResolve Argument Filter . INSTANCE . dispose () ĊĠĠĠ ĠLoc ate Method Filter . INSTANCE . dispose () ĊĠĠĠ ĠLoc ate Service Filter . INSTANCE . dispose () ĊĠĠĠ ĠSend Response Filter . INSTANCE . dispose () ĊĠ Ġ} ĊĊĠ Ġclass ĠRpc Server FilterChain Impl ( private Ġval Ġfilter List : ĠList < Rpc Server Filter >) Ġ: ĠRpc Server FilterChain Ġ{ ĊĠĠĠ Ġprivate Ġvar Ġposition Ġ= Ġ 0 ĊĠĠĠ Ġoverride Ġfun Ġfilter ( context : ĠRemote Server Invocation ) Ġ{ ĊĠĠĠĠĠ Ġif Ġ( position Ġ< Ġfilter List . size ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġfilter Ġ= Ġfilter List [ position ++] ĊĠĠĠĠĠĠĠ Ġfilter . filter ( context , Ġthis ) ĊĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĠ Ġ} Ċ }