public final class ServiceInfo extends Object
This info requires a name and a locatable service. A locatable service is a named group of
ServiceAcl
s.
ServiceAcl helloAcl = ServiceAcl.methodAndPath(Method.GET, "?/hello/.*");
ServiceAcl loginAcl = ServiceAcl.methodAndPath(Method.POST, "/login"));
ServiceAcl logoutAcl = ServiceAcl.methodAndPath(Method.POST, "/logout/.*");
ServiceInfo helloService = ServiceInfo.of("GreetingService", helloAcl, loginAcl, logoutAcl);
Modifier and Type | Method and Description |
---|---|
org.pcollections.PSequence<ServiceAcl> |
getAcls() |
static ServiceInfo |
of(String serviceName,
org.pcollections.PSequence<ServiceAcl> acls)
Factory method to create ServiceInfo instances that contain a single locatable service.
|
static ServiceInfo |
of(String serviceName,
ServiceAcl... acls)
Factory method to create ServiceInfo instances that contain a single locatable service.
|
String |
serviceName() |
public static ServiceInfo of(String serviceName, ServiceAcl... acls)
serviceName
- the service nameacls
- for the single locatableService of this Service.ServiceAcl
.public static ServiceInfo of(String serviceName, org.pcollections.PSequence<ServiceAcl> acls)
serviceName
- the service nameacls
- for the single locatableService of this Service.ServiceAcl
.public String serviceName()
public org.pcollections.PSequence<ServiceAcl> getAcls()