1 23 package com.sun.enterprise.connectors; 24 25 30 public class ConnectorNamingEvent{ 31 32 private String jndiName; private int eventType; 34 public static final int EVENT_OBJECT_REBIND = 0; 35 36 37 public ConnectorNamingEvent(String jndiName, int eventType){ 38 this.jndiName=jndiName; 39 this.eventType= eventType; 40 } 41 42 46 public String getJndiName(){ 47 return jndiName; 48 } 49 50 54 public int getEventType(){ 55 return eventType; 56 } 57 58 62 public String toString(){ 63 StringBuffer objectState = new StringBuffer ( "ConnectorNamingEvent : " + 64 "{"+ jndiName +", " + getEventName(eventType) + "}" ); 65 66 return objectState.toString(); 67 } 68 69 74 private String getEventName(int eventType){ 75 76 String eventName = "Undefined"; 77 switch(eventType){ 78 case EVENT_OBJECT_REBIND : 79 eventName= "OBJECT_REBIND_EVENT"; 80 break; 81 default: 82 } 83 return eventName; 84 } 85 } 86 | Popular Tags |