001 /*
002 * Licensed to the Apache Software Foundation (ASF) under one or more
003 * contributor license agreements. See the NOTICE file distributed with
004 * this work for additional information regarding copyright ownership.
005 * The ASF licenses this file to You under the Apache License, Version 2.0
006 * (the "License"); you may not use this file except in compliance with
007 * the License. You may obtain a copy of the License at
008 *
009 * http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017 package org.apache.servicemix.jbi.event;
018
019 import java.util.EventObject;
020
021 import javax.jbi.servicedesc.ServiceEndpoint;
022
023 /**
024 * Event sent for endpoint lifeycle.
025 *
026 * @author gnodet
027 */
028 public class EndpointEvent extends EventObject {
029
030 public static final int INTERNAL_ENDPOINT_REGISTERED = 0;
031 public static final int INTERNAL_ENDPOINT_UNREGISTERED = 1;
032 public static final int EXTERNAL_ENDPOINT_REGISTERED = 2;
033 public static final int EXTERNAL_ENDPOINT_UNREGISTERED = 3;
034 public static final int LINKED_ENDPOINT_REGISTERED = 4;
035 public static final int LINKED_ENDPOINT_UNREGISTERED = 5;
036 public static final int REMOTE_ENDPOINT_REGISTERED = 6;
037 public static final int REMOTE_ENDPOINT_UNREGISTERED = 7;
038
039 private static final long serialVersionUID = -4480619483039133388L;
040
041 private ServiceEndpoint endpoint;
042 private int type;
043
044 public EndpointEvent(ServiceEndpoint endpoint, int type) {
045 super(endpoint);
046 this.endpoint = endpoint;
047 this.type = type;
048 }
049
050 public ServiceEndpoint getEndpoint() {
051 return endpoint;
052 }
053
054 public int getEventType() {
055 return type;
056 }
057
058 }