FileDocCategorySizeDatePackage
ConnectorNamingEvent.javaAPI DocGlassfish v2 API3476Fri May 04 22:34:24 BST 2007com.sun.enterprise.connectors

ConnectorNamingEvent

public class ConnectorNamingEvent extends Object
Class representing Connector Naming Event.
Can be used to represent different states. Eg: Object-Bind, Object-Rebind, Object-Remove
author
Jagadish Ramu

Fields Summary
private String
jndiName
private int
eventType
public static final int
EVENT_OBJECT_REBIND
Constructors Summary
public ConnectorNamingEvent(String jndiName, int eventType)



        
        this.jndiName=jndiName;
        this.eventType= eventType;
    
Methods Summary
private java.lang.StringgetEventName(int eventType)
returns the name of event type.

param
eventType
return
eventName


        String eventName = "Undefined";
        switch(eventType){
            case EVENT_OBJECT_REBIND :
                eventName= "OBJECT_REBIND_EVENT";
                break;
            default:
        }
        return eventName;
    
public intgetEventType()
Info about the type of event that has occurred.

return
eventType

        return eventType;
    
public java.lang.StringgetJndiName()
To get JndiName of the object

return
jndiName

        return jndiName;
    
public java.lang.StringtoString()
Returns the state of the object

return
String

        StringBuffer objectState = new StringBuffer(  "ConnectorNamingEvent : " +
                "{"+ jndiName +", " + getEventName(eventType) + "}" );

        return objectState.toString();