1 4 package com.tc.object.appevent; 5 6 import com.tc.net.protocol.tcm.ChannelIDProvider; 7 8 public class NonPortableEventContextFactory { 9 10 private final ChannelIDProvider provider; 11 12 public NonPortableEventContextFactory(ChannelIDProvider provider) { 13 this.provider = provider; 14 } 15 16 private String getJVMId() { 17 return "VM(" + provider.getChannelID().toLong() + ")"; 18 } 19 20 public NonPortableEventContext createNonPortableEventContext(String targetClassName) { 21 return new NonPortableEventContext(targetClassName, Thread.currentThread().getName(), getJVMId()); 22 } 23 24 public NonPortableFieldSetContext createNonPortableFieldSetContext(String targetClassName, String fieldName, 25 boolean isRoot) { 26 return new NonPortableFieldSetContext(targetClassName, Thread.currentThread().getName(), getJVMId(), fieldName, 27 isRoot); 28 } 29 30 public NonPortableLogicalInvokeContext createNonPortableLogicalInvokeContext(String targetClassName, String methodName) { 31 return new NonPortableLogicalInvokeContext(targetClassName, Thread.currentThread().getName(), getJVMId(), 32 methodName); 33 } 34 35 } 36 | Popular Tags |