1 /* 2 * Copyright (c) MuleSoft, Inc. All rights reserved. http://www.mulesoft.com 3 * The software in this package is published under the terms of the CPAL v1.0 4 * license, a copy of which has been included with this distribution in the 5 * LICENSE.txt file. 6 */ 7 package org.mule.api.annotations.meta; 8 9 import java.lang.annotation.ElementType; 10 import java.lang.annotation.Retention; 11 import java.lang.annotation.RetentionPolicy; 12 import java.lang.annotation.Target; 13 14 /** 15 * Marks an endpoint annotation and provides the connector protocol and type. 16 */ 17 @Retention(RetentionPolicy.RUNTIME) 18 @Target({ElementType.ANNOTATION_TYPE}) 19 public @interface Channel 20 { 21 /** 22 * The short protocol name for the connector. Where the annotation is general 23 * purpose, a string ID can be used such as 'outbound' or 'reply'. 24 * 25 * @return the resource name for the connector 26 */ 27 String identifer(); 28 29 /** 30 * The endpoint type. <code>ChannelType.Inbound</code> is used to indicate that 31 * the endpoint annotation is used for receiving messages. 32 * <code>ChannelType.Outbound</code> indicates that the endpoint will be used for 33 * dispatching events. 34 */ 35 ChannelType type(); 36 }