blob: f7ece1cc900b72e720958eb354c7a01aeaa6ea85 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.messagebus.network.local;
import com.yahoo.messagebus.network.ServiceAddress;
/**
* @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen Hult</a>
*/
public class LocalServiceAddress implements ServiceAddress {
private final LocalNetwork network;
private final String sessionName;
public LocalServiceAddress(final String serviceName, final LocalNetwork network) {
this.network = network;
this.sessionName = serviceName.substring(serviceName.lastIndexOf('/') + 1);
}
public LocalNetwork getNetwork() {
return network;
}
public String getSessionName() {
return sessionName;
}
}
|