[−][src]Struct thrift::server::TMultiplexedProcessor
A TProcessor
that can demux service calls to multiple underlying
Thrift services.
Users register service-specific TProcessor
instances with a
TMultiplexedProcessor
, and then register that processor with a server
implementation. Following that, all incoming service calls are automatically
routed to the service-specific TProcessor
.
A TMultiplexedProcessor
can only handle messages sent by a
TMultiplexedOutputProtocol
.
Methods
impl TMultiplexedProcessor
[src]
pub fn new() -> TMultiplexedProcessor
[src]
Create a new TMultiplexedProcessor
with no registered service-specific
processors.
pub fn register<S: Into<String>>(
&mut self,
service_name: S,
processor: Box<dyn TProcessor + Send + Sync>,
as_default: bool
) -> Result<()>
[src]
&mut self,
service_name: S,
processor: Box<dyn TProcessor + Send + Sync>,
as_default: bool
) -> Result<()>
Register a service-specific processor
for the service named
service_name
. This implementation is also backwards-compatible with
non-multiplexed clients. Set as_default
to true
to allow
non-namespaced requests to be dispatched to a default processor.
Returns success if a new entry was inserted. Returns an error if:
- A processor exists for
service_name
- You attempt to register a processor as default, and an existing default exists
Trait Implementations
impl TProcessor for TMultiplexedProcessor
[src]
fn process(
&self,
i_prot: &mut dyn TInputProtocol,
o_prot: &mut dyn TOutputProtocol
) -> Result<()>
[src]
&self,
i_prot: &mut dyn TInputProtocol,
o_prot: &mut dyn TOutputProtocol
) -> Result<()>
impl Default for TMultiplexedProcessor
[src]
fn default() -> TMultiplexedProcessor
[src]
impl Debug for TMultiplexedProcessor
[src]
Auto Trait Implementations
impl Send for TMultiplexedProcessor
impl Sync for TMultiplexedProcessor
impl Unpin for TMultiplexedProcessor
impl UnwindSafe for TMultiplexedProcessor
impl RefUnwindSafe for TMultiplexedProcessor
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,