Search in sources :

Example 11 with ServiceName

use of jp.ossc.nimbus.core.ServiceName in project nimbus by nimbus-org.

the class ServiceNameArrayEditorTest method testSetAsText6.

public void testSetAsText6() throws Exception {
    ServiceNameArrayEditor editor = new ServiceNameArrayEditor();
    editor.setServiceManagerName("Manager1");
    System.setProperty("test.ServiceNameArrayEditor.value", "Manager2#Service2");
    editor.setAsText("#Service1\n${test.ServiceNameArrayEditor.value}");
    Object val = editor.getValue();
    assertEquals(2, Array.getLength(val));
    assertEquals(new ServiceName("Manager1", "Service1"), Array.get(val, 0));
    assertEquals(new ServiceName("Manager2", "Service2"), Array.get(val, 1));
}
Also used : ServiceName(jp.ossc.nimbus.core.ServiceName)

Example 12 with ServiceName

use of jp.ossc.nimbus.core.ServiceName in project nimbus by nimbus-org.

the class ServiceNameArrayEditorTest method testSetAsText2.

public void testSetAsText2() throws Exception {
    ServiceNameArrayEditor editor = new ServiceNameArrayEditor();
    editor.setServiceManagerName("Manager1");
    editor.setAsText("#Service1\n");
    Object val = editor.getValue();
    assertEquals(1, Array.getLength(val));
    assertEquals(new ServiceName("Manager1", "Service1"), Array.get(val, 0));
}
Also used : ServiceName(jp.ossc.nimbus.core.ServiceName)

Example 13 with ServiceName

use of jp.ossc.nimbus.core.ServiceName in project nimbus by nimbus-org.

the class ServiceNameArrayEditorTest method testSetAsText5.

public void testSetAsText5() throws Exception {
    ServiceNameArrayEditor editor = new ServiceNameArrayEditor();
    editor.setServiceManagerName("Manager1");
    editor.setAsText("#Service1\n<!-- Manager2#Service2 -->\nService3");
    Object val = editor.getValue();
    assertEquals(2, Array.getLength(val));
    assertEquals(new ServiceName("Manager1", "Service1"), Array.get(val, 0));
    assertEquals(new ServiceName("Nimbus", "Service3"), Array.get(val, 1));
}
Also used : ServiceName(jp.ossc.nimbus.core.ServiceName)

Example 14 with ServiceName

use of jp.ossc.nimbus.core.ServiceName in project nimbus by nimbus-org.

the class ServiceNameArrayEditorTest method testSetAsText3.

public void testSetAsText3() throws Exception {
    ServiceNameArrayEditor editor = new ServiceNameArrayEditor();
    editor.setServiceManagerName("Manager1");
    editor.setAsText("#Service1\nManager2#Service2");
    Object val = editor.getValue();
    assertEquals(2, Array.getLength(val));
    assertEquals(new ServiceName("Manager1", "Service1"), Array.get(val, 0));
    assertEquals(new ServiceName("Manager2", "Service2"), Array.get(val, 1));
}
Also used : ServiceName(jp.ossc.nimbus.core.ServiceName)

Example 15 with ServiceName

use of jp.ossc.nimbus.core.ServiceName in project nimbus by nimbus-org.

the class ServiceNameArrayEditorTest method testSetAsText4.

public void testSetAsText4() throws Exception {
    ServiceNameArrayEditor editor = new ServiceNameArrayEditor();
    editor.setServiceManagerName("Manager1");
    editor.setAsText(" \t #Service1\n    Manager2#Service2  \n    Service3  ");
    Object val = editor.getValue();
    assertEquals(3, Array.getLength(val));
    assertEquals(new ServiceName("Manager1", "Service1"), Array.get(val, 0));
    assertEquals(new ServiceName("Manager2", "Service2"), Array.get(val, 1));
    assertEquals(new ServiceName("Nimbus", "Service3"), Array.get(val, 2));
}
Also used : ServiceName(jp.ossc.nimbus.core.ServiceName)

Aggregations

ServiceName (jp.ossc.nimbus.core.ServiceName)66 ServiceNameRef (jp.ossc.nimbus.core.ServiceNameRef)13 ServiceNameEditor (jp.ossc.nimbus.beans.ServiceNameEditor)12 DefaultInterceptorChainList (jp.ossc.nimbus.service.aop.DefaultInterceptorChainList)9 DefaultMethodInvocationContext (jp.ossc.nimbus.service.aop.DefaultMethodInvocationContext)8 Interceptor (jp.ossc.nimbus.service.aop.Interceptor)8 InvocationContext (jp.ossc.nimbus.service.aop.InvocationContext)8 FilterChain (javax.servlet.FilterChain)7 InterceptorChain (jp.ossc.nimbus.service.aop.InterceptorChain)7 Map (java.util.Map)6 Properties (java.util.Properties)6 DefaultInterceptorChain (jp.ossc.nimbus.service.aop.DefaultInterceptorChain)6 HashMap (java.util.HashMap)5 ServiceMetaData (jp.ossc.nimbus.core.ServiceMetaData)5 Invoker (jp.ossc.nimbus.service.aop.Invoker)5 Iterator (java.util.Iterator)4 Method (java.lang.reflect.Method)3 ServletConfig (javax.servlet.ServletConfig)3 DefaultThreadLocalInterceptorChain (jp.ossc.nimbus.service.aop.DefaultThreadLocalInterceptorChain)3 DefaultSemaphoreService (jp.ossc.nimbus.service.semaphore.DefaultSemaphoreService)3