You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2006/10/24 04:45:59 UTC
svn commit: r467206 [3/30] - in /tomcat: build/tc5.5.x/ connectors/trunk/
connectors/trunk/ajp/ajplib/test/ connectors/trunk/ajp/proxy/
connectors/trunk/jk/jkstatus/src/share/org/apache/jk/status/
connectors/trunk/jk/native/iis/ connectors/trunk/jk/nat...
Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelInterceptor.java
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelInterceptor.java?view=diff&rev=467206&r1=467205&r2=467206
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelInterceptor.java (original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelInterceptor.java Mon Oct 23 19:45:46 2006
@@ -1,180 +1,180 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.catalina.tribes;
-
-import org.apache.catalina.tribes.group.InterceptorPayload;
-
-/**
- * A ChannelInterceptor is an interceptor that intercepts
- * messages and membership messages in the channel stack.
- * This allows interceptors to modify the message or perform
- * other actions when a message is sent or received.<br>
- * Interceptors are tied together in a linked list.
- * @see org.apache.catalina.tribes.group.ChannelInterceptorBase
- * @author Filip Hanik
- * @version $Revision: 304032 $, $Date: 2005-07-27 10:11:55 -0500 (Wed, 27 Jul 2005) $
- */
-
-public interface ChannelInterceptor extends MembershipListener, Heartbeat {
-
- /**
- * An interceptor can react to a message based on a set bit on the
- * message options. <br>
- * When a message is sent, the options can be retrieved from ChannelMessage.getOptions()
- * and if the bit is set, this interceptor will react to it.<br>
- * A simple evaluation if an interceptor should react to the message would be:<br>
- * <code>boolean react = (getOptionFlag() == (getOptionFlag() & ChannelMessage.getOptions()));</code><br>
- * The default option is 0, meaning there is no way for the application to trigger the
- * interceptor. The interceptor itself will decide.<br>
- * @return int
- * @see ChannelMessage#getOptions()
- */
- public int getOptionFlag();
-
- /**
- * Sets the option flag
- * @param flag int
- * @see #getOptionFlag()
- */
- public void setOptionFlag(int flag);
-
- /**
- * Set the next interceptor in the list of interceptors
- * @param next ChannelInterceptor
- */
- public void setNext(ChannelInterceptor next) ;
-
- /**
- * Retrieve the next interceptor in the list
- * @return ChannelInterceptor - returns the next interceptor in the list or null if no more interceptors exist
- */
- public ChannelInterceptor getNext();
-
- /**
- * Set the previous interceptor in the list
- * @param previous ChannelInterceptor
- */
- public void setPrevious(ChannelInterceptor previous);
-
- /**
- * Retrieve the previous interceptor in the list
- * @return ChannelInterceptor - returns the previous interceptor in the list or null if no more interceptors exist
- */
- public ChannelInterceptor getPrevious();
-
- /**
- * The <code>sendMessage</code> method is called when a message is being sent to one more destinations.
- * The interceptor can modify any of the parameters and then pass on the message down the stack by
- * invoking <code>getNext().sendMessage(destination,msg,payload)</code><br>
- * Alternatively the interceptor can stop the message from being sent by not invoking
- * <code>getNext().sendMessage(destination,msg,payload)</code><br>
- * If the message is to be sent asynchronous the application can be notified of completion and
- * errors by passing in an error handler attached to a payload object.<br>
- * The ChannelMessage.getAddress contains Channel.getLocalMember, and can be overwritten
- * to simulate a message sent from another node.<br>
- * @param destination Member[] - the destination for this message
- * @param msg ChannelMessage - the message to be sent
- * @param payload InterceptorPayload - the payload, carrying an error handler and future useful data, can be null
- * @throws ChannelException
- * @see ErrorHandler
- * @see InterceptorPayload
- */
- public void sendMessage(Member[] destination, ChannelMessage msg, InterceptorPayload payload) throws ChannelException;
-
- /**
- * the <code>messageReceived</code> is invoked when a message is received.
- * <code>ChannelMessage.getAddress()</code> is the sender, or the reply-to address
- * if it has been overwritten.
- * @param data ChannelMessage
- */
- public void messageReceived(ChannelMessage data);
-
- /**
- * The <code>heartbeat()</code> method gets invoked periodically
- * to allow interceptors to clean up resources, time out object and
- * perform actions that are unrelated to sending/receiving data.
- */
- public void heartbeat();
-
- /**
- * Intercepts the <code>Channel.hasMembers()</code> method
- * @return boolean - if the channel has members in its membership group
- * @see Channel#hasMembers()
- */
- public boolean hasMembers() ;
-
- /**
- * Intercepts the code>Channel.getMembers()</code> method
- * @return Member[]
- * @see Channel#getMembers()
- */
- public Member[] getMembers() ;
-
- /**
- * Intercepts the code>Channel.getLocalMember(boolean)</code> method
- * @param incAliveTime boolean
- * @return Member
- * @see Channel#getLocalMember(boolean)
- */
- public Member getLocalMember(boolean incAliveTime) ;
-
- /**
- * Intercepts the code>Channel.getMember(Member)</code> method
- * @param mbr Member
- * @return Member - the actual member information, including stay alive
- * @see Channel#getMember(Member)
- */
- public Member getMember(Member mbr);
-
- /**
- * Starts up the channel. This can be called multiple times for individual services to start
- * The svc parameter can be the logical or value of any constants
- * @param svc int value of <BR>
- * Channel.DEFAULT - will start all services <BR>
- * Channel.MBR_RX_SEQ - starts the membership receiver <BR>
- * Channel.MBR_TX_SEQ - starts the membership broadcaster <BR>
- * Channel.SND_TX_SEQ - starts the replication transmitter<BR>
- * Channel.SND_RX_SEQ - starts the replication receiver<BR>
- * @throws ChannelException if a startup error occurs or the service is already started.
- * @see Channel
- */
- public void start(int svc) throws ChannelException;
-
- /**
- * Shuts down the channel. This can be called multiple times for individual services to shutdown
- * The svc parameter can be the logical or value of any constants
- * @param svc int value of <BR>
- * Channel.DEFAULT - will shutdown all services <BR>
- * Channel.MBR_RX_SEQ - stops the membership receiver <BR>
- * Channel.MBR_TX_SEQ - stops the membership broadcaster <BR>
- * Channel.SND_TX_SEQ - stops the replication transmitter<BR>
- * Channel.SND_RX_SEQ - stops the replication receiver<BR>
- * @throws ChannelException if a startup error occurs or the service is already started.
- * @see Channel
- */
- public void stop(int svc) throws ChannelException;
-
- public void fireInterceptorEvent(InterceptorEvent event);
-
- interface InterceptorEvent {
- int getEventType();
- String getEventTypeDesc();
- ChannelInterceptor getInterceptor();
- }
-
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.catalina.tribes;
+
+import org.apache.catalina.tribes.group.InterceptorPayload;
+
+/**
+ * A ChannelInterceptor is an interceptor that intercepts
+ * messages and membership messages in the channel stack.
+ * This allows interceptors to modify the message or perform
+ * other actions when a message is sent or received.<br>
+ * Interceptors are tied together in a linked list.
+ * @see org.apache.catalina.tribes.group.ChannelInterceptorBase
+ * @author Filip Hanik
+ * @version $Revision$, $Date$
+ */
+
+public interface ChannelInterceptor extends MembershipListener, Heartbeat {
+
+ /**
+ * An interceptor can react to a message based on a set bit on the
+ * message options. <br>
+ * When a message is sent, the options can be retrieved from ChannelMessage.getOptions()
+ * and if the bit is set, this interceptor will react to it.<br>
+ * A simple evaluation if an interceptor should react to the message would be:<br>
+ * <code>boolean react = (getOptionFlag() == (getOptionFlag() & ChannelMessage.getOptions()));</code><br>
+ * The default option is 0, meaning there is no way for the application to trigger the
+ * interceptor. The interceptor itself will decide.<br>
+ * @return int
+ * @see ChannelMessage#getOptions()
+ */
+ public int getOptionFlag();
+
+ /**
+ * Sets the option flag
+ * @param flag int
+ * @see #getOptionFlag()
+ */
+ public void setOptionFlag(int flag);
+
+ /**
+ * Set the next interceptor in the list of interceptors
+ * @param next ChannelInterceptor
+ */
+ public void setNext(ChannelInterceptor next) ;
+
+ /**
+ * Retrieve the next interceptor in the list
+ * @return ChannelInterceptor - returns the next interceptor in the list or null if no more interceptors exist
+ */
+ public ChannelInterceptor getNext();
+
+ /**
+ * Set the previous interceptor in the list
+ * @param previous ChannelInterceptor
+ */
+ public void setPrevious(ChannelInterceptor previous);
+
+ /**
+ * Retrieve the previous interceptor in the list
+ * @return ChannelInterceptor - returns the previous interceptor in the list or null if no more interceptors exist
+ */
+ public ChannelInterceptor getPrevious();
+
+ /**
+ * The <code>sendMessage</code> method is called when a message is being sent to one more destinations.
+ * The interceptor can modify any of the parameters and then pass on the message down the stack by
+ * invoking <code>getNext().sendMessage(destination,msg,payload)</code><br>
+ * Alternatively the interceptor can stop the message from being sent by not invoking
+ * <code>getNext().sendMessage(destination,msg,payload)</code><br>
+ * If the message is to be sent asynchronous the application can be notified of completion and
+ * errors by passing in an error handler attached to a payload object.<br>
+ * The ChannelMessage.getAddress contains Channel.getLocalMember, and can be overwritten
+ * to simulate a message sent from another node.<br>
+ * @param destination Member[] - the destination for this message
+ * @param msg ChannelMessage - the message to be sent
+ * @param payload InterceptorPayload - the payload, carrying an error handler and future useful data, can be null
+ * @throws ChannelException
+ * @see ErrorHandler
+ * @see InterceptorPayload
+ */
+ public void sendMessage(Member[] destination, ChannelMessage msg, InterceptorPayload payload) throws ChannelException;
+
+ /**
+ * the <code>messageReceived</code> is invoked when a message is received.
+ * <code>ChannelMessage.getAddress()</code> is the sender, or the reply-to address
+ * if it has been overwritten.
+ * @param data ChannelMessage
+ */
+ public void messageReceived(ChannelMessage data);
+
+ /**
+ * The <code>heartbeat()</code> method gets invoked periodically
+ * to allow interceptors to clean up resources, time out object and
+ * perform actions that are unrelated to sending/receiving data.
+ */
+ public void heartbeat();
+
+ /**
+ * Intercepts the <code>Channel.hasMembers()</code> method
+ * @return boolean - if the channel has members in its membership group
+ * @see Channel#hasMembers()
+ */
+ public boolean hasMembers() ;
+
+ /**
+ * Intercepts the code>Channel.getMembers()</code> method
+ * @return Member[]
+ * @see Channel#getMembers()
+ */
+ public Member[] getMembers() ;
+
+ /**
+ * Intercepts the code>Channel.getLocalMember(boolean)</code> method
+ * @param incAliveTime boolean
+ * @return Member
+ * @see Channel#getLocalMember(boolean)
+ */
+ public Member getLocalMember(boolean incAliveTime) ;
+
+ /**
+ * Intercepts the code>Channel.getMember(Member)</code> method
+ * @param mbr Member
+ * @return Member - the actual member information, including stay alive
+ * @see Channel#getMember(Member)
+ */
+ public Member getMember(Member mbr);
+
+ /**
+ * Starts up the channel. This can be called multiple times for individual services to start
+ * The svc parameter can be the logical or value of any constants
+ * @param svc int value of <BR>
+ * Channel.DEFAULT - will start all services <BR>
+ * Channel.MBR_RX_SEQ - starts the membership receiver <BR>
+ * Channel.MBR_TX_SEQ - starts the membership broadcaster <BR>
+ * Channel.SND_TX_SEQ - starts the replication transmitter<BR>
+ * Channel.SND_RX_SEQ - starts the replication receiver<BR>
+ * @throws ChannelException if a startup error occurs or the service is already started.
+ * @see Channel
+ */
+ public void start(int svc) throws ChannelException;
+
+ /**
+ * Shuts down the channel. This can be called multiple times for individual services to shutdown
+ * The svc parameter can be the logical or value of any constants
+ * @param svc int value of <BR>
+ * Channel.DEFAULT - will shutdown all services <BR>
+ * Channel.MBR_RX_SEQ - stops the membership receiver <BR>
+ * Channel.MBR_TX_SEQ - stops the membership broadcaster <BR>
+ * Channel.SND_TX_SEQ - stops the replication transmitter<BR>
+ * Channel.SND_RX_SEQ - stops the replication receiver<BR>
+ * @throws ChannelException if a startup error occurs or the service is already started.
+ * @see Channel
+ */
+ public void stop(int svc) throws ChannelException;
+
+ public void fireInterceptorEvent(InterceptorEvent event);
+
+ interface InterceptorEvent {
+ int getEventType();
+ String getEventTypeDesc();
+ ChannelInterceptor getInterceptor();
+ }
+
+
+}
Propchange: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelInterceptor.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelInterceptor.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelListener.java
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelListener.java?view=diff&rev=467206&r1=467205&r2=467206
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelListener.java (original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelListener.java Mon Oct 23 19:45:46 2006
@@ -1,68 +1,68 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.catalina.tribes;
-
-import java.io.Serializable;
-/**
- *
- * <p>Title: ChannelListener</p>
- *
- * <p>Description: An interface to listens to incoming messages from a channel </p>
- * When a message is received, the Channel will invoke the channel listener in a conditional sequence.
- * <code>if ( listener.accept(msg,sender) ) listener.messageReceived(msg,sender);</code><br>
- * A ChannelListener implementation MUST NOT return true on <code>accept(Serializable, Member)</code>
- * if it doesn't intend to process the message. The channel can this way track whether a message
- * was processed by an above application or if it was just received and forgot about, a featuer required
- * to support message-response(RPC) calls<br>
- *
- * @author Filip Hanik
- * @version 1.0
- */
-
-public interface ChannelListener {
-
- /**
- * Receive a message from the channel
- * @param msg Serializable
- * @param sender - the source of the message
- */
- public void messageReceived(Serializable msg, Member sender);
-
- /**
- * Invoked by the channel to determine if the listener will process this message or not.
- * @param msg Serializable
- * @param sender Member
- * @return boolean
- */
- public boolean accept(Serializable msg, Member sender);
-
- /**
- *
- * @param listener Object
- * @return boolean
- * @see Object#equals(Object)
- */
- public boolean equals(Object listener);
-
- /**
- *
- * @return int
- * @see Object#hashCode(int)
- */
- public int hashCode();
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.catalina.tribes;
+
+import java.io.Serializable;
+/**
+ *
+ * <p>Title: ChannelListener</p>
+ *
+ * <p>Description: An interface to listens to incoming messages from a channel </p>
+ * When a message is received, the Channel will invoke the channel listener in a conditional sequence.
+ * <code>if ( listener.accept(msg,sender) ) listener.messageReceived(msg,sender);</code><br>
+ * A ChannelListener implementation MUST NOT return true on <code>accept(Serializable, Member)</code>
+ * if it doesn't intend to process the message. The channel can this way track whether a message
+ * was processed by an above application or if it was just received and forgot about, a featuer required
+ * to support message-response(RPC) calls<br>
+ *
+ * @author Filip Hanik
+ * @version 1.0
+ */
+
+public interface ChannelListener {
+
+ /**
+ * Receive a message from the channel
+ * @param msg Serializable
+ * @param sender - the source of the message
+ */
+ public void messageReceived(Serializable msg, Member sender);
+
+ /**
+ * Invoked by the channel to determine if the listener will process this message or not.
+ * @param msg Serializable
+ * @param sender Member
+ * @return boolean
+ */
+ public boolean accept(Serializable msg, Member sender);
+
+ /**
+ *
+ * @param listener Object
+ * @return boolean
+ * @see Object#equals(Object)
+ */
+ public boolean equals(Object listener);
+
+ /**
+ *
+ * @return int
+ * @see Object#hashCode(int)
+ */
+ public int hashCode();
+
+}
Propchange: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelListener.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelListener.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelMessage.java
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelMessage.java?view=diff&rev=467206&r1=467205&r2=467206
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelMessage.java (original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelMessage.java Mon Oct 23 19:45:46 2006
@@ -1,109 +1,109 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.catalina.tribes;
-
-import java.io.Serializable;
-import org.apache.catalina.tribes.io.XByteBuffer;
-
-/**
- * Message that is passed through the interceptor stack after the
- * data serialized in the Channel object and then passed down to the
- * interceptor and eventually down to the ChannelSender component
- * @author Filip Hanik
- *
- */
-public interface ChannelMessage extends Serializable {
-
-
-
-
- /**
- * Get the address that this message originated from.
- * Almost always <code>Channel.getLocalMember(boolean)</code><br>
- * This would be set to a different address
- * if the message was being relayed from a host other than the one
- * that originally sent it.
- * @return the source or reply-to address of this message
- */
- public Member getAddress();
-
- /**
- * Sets the source or reply-to address of this message
- * @param member Member
- */
- public void setAddress(Member member);
-
- /**
- * Timestamp of when the message was created.
- * @return long timestamp in milliseconds
- */
- public long getTimestamp();
-
- /**
- *
- * Sets the timestamp of this message
- * @param timestamp The timestamp
- */
- public void setTimestamp(long timestamp);
-
- /**
- * Each message must have a globally unique Id.
- * interceptors heavily depend on this id for message processing
- * @return byte
- */
- public byte[] getUniqueId();
-
- /**
- * The byte buffer that contains the actual message payload
- * @param buf XByteBuffer
- */
- public void setMessage(XByteBuffer buf);
-
- /**
- * returns the byte buffer that contains the actual message payload
- * @return XByteBuffer
- */
- public XByteBuffer getMessage();
-
- /**
- * The message options is a 32 bit flag set
- * that triggers interceptors and message behavior.
- * @see Channel#send(Member[], Serializable, int)
- * @see ChannelInterceptor#getOptionFlag
- * @return int - the option bits set for this message
- */
- public int getOptions();
-
- /**
- * sets the option bits for this message
- * @param options int
- * @see #getOptions()
- */
- public void setOptions(int options);
-
- /**
- * Shallow clone, what gets cloned depends on the implementation
- * @return ChannelMessage
- */
- public Object clone();
-
- /**
- * Deep clone, all fields MUST get cloned
- * @return ChannelMessage
- */
- public Object deepclone();
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.catalina.tribes;
+
+import java.io.Serializable;
+import org.apache.catalina.tribes.io.XByteBuffer;
+
+/**
+ * Message that is passed through the interceptor stack after the
+ * data serialized in the Channel object and then passed down to the
+ * interceptor and eventually down to the ChannelSender component
+ * @author Filip Hanik
+ *
+ */
+public interface ChannelMessage extends Serializable {
+
+
+
+
+ /**
+ * Get the address that this message originated from.
+ * Almost always <code>Channel.getLocalMember(boolean)</code><br>
+ * This would be set to a different address
+ * if the message was being relayed from a host other than the one
+ * that originally sent it.
+ * @return the source or reply-to address of this message
+ */
+ public Member getAddress();
+
+ /**
+ * Sets the source or reply-to address of this message
+ * @param member Member
+ */
+ public void setAddress(Member member);
+
+ /**
+ * Timestamp of when the message was created.
+ * @return long timestamp in milliseconds
+ */
+ public long getTimestamp();
+
+ /**
+ *
+ * Sets the timestamp of this message
+ * @param timestamp The timestamp
+ */
+ public void setTimestamp(long timestamp);
+
+ /**
+ * Each message must have a globally unique Id.
+ * interceptors heavily depend on this id for message processing
+ * @return byte
+ */
+ public byte[] getUniqueId();
+
+ /**
+ * The byte buffer that contains the actual message payload
+ * @param buf XByteBuffer
+ */
+ public void setMessage(XByteBuffer buf);
+
+ /**
+ * returns the byte buffer that contains the actual message payload
+ * @return XByteBuffer
+ */
+ public XByteBuffer getMessage();
+
+ /**
+ * The message options is a 32 bit flag set
+ * that triggers interceptors and message behavior.
+ * @see Channel#send(Member[], Serializable, int)
+ * @see ChannelInterceptor#getOptionFlag
+ * @return int - the option bits set for this message
+ */
+ public int getOptions();
+
+ /**
+ * sets the option bits for this message
+ * @param options int
+ * @see #getOptions()
+ */
+ public void setOptions(int options);
+
+ /**
+ * Shallow clone, what gets cloned depends on the implementation
+ * @return ChannelMessage
+ */
+ public Object clone();
+
+ /**
+ * Deep clone, all fields MUST get cloned
+ * @return ChannelMessage
+ */
+ public Object deepclone();
+}
Propchange: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelMessage.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelMessage.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelReceiver.java
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelReceiver.java?view=diff&rev=467206&r1=467205&r2=467206
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelReceiver.java (original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelReceiver.java Mon Oct 23 19:45:46 2006
@@ -1,69 +1,69 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.catalina.tribes;
-
-
-/**
- * ChannelReceiver Interface<br>
- * The <code>ChannelReceiver</code> interface is the data receiver component
- * at the bottom layer, the IO layer (for layers see the javadoc for the {@link Channel} interface).
- * This class may optionally implement a thread pool for parallel processing of incoming messages.
- * @author Filip Hanik
- * @version $Revision: 379904 $, $Date: 2006-02-22 15:16:25 -0600 (Wed, 22 Feb 2006) $
- */
-public interface ChannelReceiver extends Heartbeat {
- /**
- * Start listening for incoming messages on the host/port
- * @throws java.io.IOException
- */
- public void start() throws java.io.IOException;
-
- /**
- * Stop listening for messages
- */
- public void stop();
-
- /**
- * String representation of the IPv4 or IPv6 address that this host is listening
- * to.
- * @return the host that this receiver is listening to
- */
- public String getHost();
-
-
- /**
- * Returns the listening port
- * @return port
- */
- public int getPort();
-
- /**
- * Sets the message listener to receive notification of incoming
- * @param listener MessageListener
- * @see MessageListener
- */
- public void setMessageListener(MessageListener listener);
-
- /**
- * Returns the message listener that is associated with this receiver
- * @return MessageListener
- * @see MessageListener
- */
- public MessageListener getMessageListener();
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.catalina.tribes;
+
+
+/**
+ * ChannelReceiver Interface<br>
+ * The <code>ChannelReceiver</code> interface is the data receiver component
+ * at the bottom layer, the IO layer (for layers see the javadoc for the {@link Channel} interface).
+ * This class may optionally implement a thread pool for parallel processing of incoming messages.
+ * @author Filip Hanik
+ * @version $Revision$, $Date$
+ */
+public interface ChannelReceiver extends Heartbeat {
+ /**
+ * Start listening for incoming messages on the host/port
+ * @throws java.io.IOException
+ */
+ public void start() throws java.io.IOException;
+
+ /**
+ * Stop listening for messages
+ */
+ public void stop();
+
+ /**
+ * String representation of the IPv4 or IPv6 address that this host is listening
+ * to.
+ * @return the host that this receiver is listening to
+ */
+ public String getHost();
+
+
+ /**
+ * Returns the listening port
+ * @return port
+ */
+ public int getPort();
+
+ /**
+ * Sets the message listener to receive notification of incoming
+ * @param listener MessageListener
+ * @see MessageListener
+ */
+ public void setMessageListener(MessageListener listener);
+
+ /**
+ * Returns the message listener that is associated with this receiver
+ * @return MessageListener
+ * @see MessageListener
+ */
+ public MessageListener getMessageListener();
+
+}
Propchange: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelReceiver.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelReceiver.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelSender.java
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelSender.java?view=diff&rev=467206&r1=467205&r2=467206
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelSender.java (original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelSender.java Mon Oct 23 19:45:46 2006
@@ -1,69 +1,69 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.catalina.tribes;
-
-
-/**
- * ChannelReceiver Interface<br>
- * The <code>ChannelSender</code> interface is the data sender component
- * at the bottom layer, the IO layer (for layers see the javadoc for the {@link Channel} interface).<br>
- * The channel sender must support "silent" members, ie, be able to send a message to a member
- * that is not in the membership, but is part of the destination parameter
- * @author Filip Hanik
- * @version $Revision: 379904 $, $Date: 2006-02-22 15:16:25 -0600 (Wed, 22 Feb 2006) $
- */
-public interface ChannelSender extends Heartbeat
-{
- /**
- * Notify the sender of a member being added to the group.<br>
- * Optional. This can be an empty implementation, that does nothing
- * @param member Member
- */
- public void add(Member member);
- /**
- * Notification that a member has been removed or crashed.
- * Can be used to clean up open connections etc
- * @param member Member
- */
- public void remove(Member member);
-
- /**
- * Start the channel sender
- * @throws IOException if preprocessing takes place and an error happens
- */
- public void start() throws java.io.IOException;
- /**
- * Stop the channel sender
- */
- public void stop();
-
- /**
- * A channel heartbeat, use this method to clean up resources
- */
- public void heartbeat() ;
-
- /**
- * Send a message to one or more recipients.
- * @param message ChannelMessage - the message to be sent
- * @param destination Member[] - the destinations
- * @throws ChannelException - if an error happens, the ChannelSender MUST report
- * individual send failures on a per member basis, using ChannelException.addFaultyMember
- * @see ChannelException#addFaultyMember(Member,java.lang.Exception)
- */
- public void sendMessage(ChannelMessage message, Member[] destination) throws ChannelException;
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.catalina.tribes;
+
+
+/**
+ * ChannelReceiver Interface<br>
+ * The <code>ChannelSender</code> interface is the data sender component
+ * at the bottom layer, the IO layer (for layers see the javadoc for the {@link Channel} interface).<br>
+ * The channel sender must support "silent" members, ie, be able to send a message to a member
+ * that is not in the membership, but is part of the destination parameter
+ * @author Filip Hanik
+ * @version $Revision$, $Date$
+ */
+public interface ChannelSender extends Heartbeat
+{
+ /**
+ * Notify the sender of a member being added to the group.<br>
+ * Optional. This can be an empty implementation, that does nothing
+ * @param member Member
+ */
+ public void add(Member member);
+ /**
+ * Notification that a member has been removed or crashed.
+ * Can be used to clean up open connections etc
+ * @param member Member
+ */
+ public void remove(Member member);
+
+ /**
+ * Start the channel sender
+ * @throws IOException if preprocessing takes place and an error happens
+ */
+ public void start() throws java.io.IOException;
+ /**
+ * Stop the channel sender
+ */
+ public void stop();
+
+ /**
+ * A channel heartbeat, use this method to clean up resources
+ */
+ public void heartbeat() ;
+
+ /**
+ * Send a message to one or more recipients.
+ * @param message ChannelMessage - the message to be sent
+ * @param destination Member[] - the destinations
+ * @throws ChannelException - if an error happens, the ChannelSender MUST report
+ * individual send failures on a per member basis, using ChannelException.addFaultyMember
+ * @see ChannelException#addFaultyMember(Member,java.lang.Exception)
+ */
+ public void sendMessage(ChannelMessage message, Member[] destination) throws ChannelException;
+}
Propchange: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelSender.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelSender.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/Constants.java
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/Constants.java?view=diff&rev=467206&r1=467205&r2=467206
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/Constants.java (original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/Constants.java Mon Oct 23 19:45:46 2006
@@ -1,32 +1,32 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-package org.apache.catalina.tribes;
-
-/**
- * Manifest constants for the <code>org.apache.catalina.tribes</code>
- * package.
- *
- * @author Bip Thelin
- * @author Filip Hanik
- * @version $Revision: 302726 $, $Date: 2004-02-27 08:59:07 -0600 (Fri, 27 Feb 2004) $
- */
-
-public final class Constants {
- public static final String Package = "org.apache.catalina.tribes";
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package org.apache.catalina.tribes;
+
+/**
+ * Manifest constants for the <code>org.apache.catalina.tribes</code>
+ * package.
+ *
+ * @author Bip Thelin
+ * @author Filip Hanik
+ * @version $Revision$, $Date$
+ */
+
+public final class Constants {
+ public static final String Package = "org.apache.catalina.tribes";
+}
Propchange: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/Constants.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/Constants.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ErrorHandler.java
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ErrorHandler.java?view=diff&rev=467206&r1=467205&r2=467206
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ErrorHandler.java (original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ErrorHandler.java Mon Oct 23 19:45:46 2006
@@ -1,46 +1,46 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.catalina.tribes;
-
-
-
-/**
- * The <code>ErrorHandler</code> class is used when sending messages
- * that are sent asynchronously and the application still needs to get
- * confirmation when the message was sent successfully or when a message errored out.
- * @author Filip Hanik
- * @version 1.0
- */
-public interface ErrorHandler {
-
- /**
- * Invoked if the message is dispatched asynch, and an error occurs
- * @param x ChannelException - the error that happened
- * @param id - the unique id for the message
- * @see Channel#send(Member[], Serializable, int, ErrorHandler)
- */
- public void handleError(ChannelException x, UniqueId id);
-
- /**
- * Invoked when the message has been sent successfully.
- * @param id - the unique id for the message
- * @see Channel#send(Member[], Serializable, int, ErrorHandler)
- */
- public void handleCompletion(UniqueId id);
-
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.catalina.tribes;
+
+
+
+/**
+ * The <code>ErrorHandler</code> class is used when sending messages
+ * that are sent asynchronously and the application still needs to get
+ * confirmation when the message was sent successfully or when a message errored out.
+ * @author Filip Hanik
+ * @version 1.0
+ */
+public interface ErrorHandler {
+
+ /**
+ * Invoked if the message is dispatched asynch, and an error occurs
+ * @param x ChannelException - the error that happened
+ * @param id - the unique id for the message
+ * @see Channel#send(Member[], Serializable, int, ErrorHandler)
+ */
+ public void handleError(ChannelException x, UniqueId id);
+
+ /**
+ * Invoked when the message has been sent successfully.
+ * @param id - the unique id for the message
+ * @see Channel#send(Member[], Serializable, int, ErrorHandler)
+ */
+ public void handleCompletion(UniqueId id);
+
}
Propchange: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ErrorHandler.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ErrorHandler.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/Heartbeat.java
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/Heartbeat.java?view=diff&rev=467206&r1=467205&r2=467206
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/Heartbeat.java (original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/Heartbeat.java Mon Oct 23 19:45:46 2006
@@ -1,34 +1,34 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.catalina.tribes;
-
-/**
- * Can be implemented by the ChannelListener and Membership listeners to receive heartbeat
- * notifications from the Channel
- * @author Filip Hanik
- * @version 1.0
- * @see Channel
- * @see Channel#heartbeat()
- */
-public interface Heartbeat {
-
- /**
- * Heartbeat invokation for resources cleanup etc
- */
- public void heartbeat();
-
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.catalina.tribes;
+
+/**
+ * Can be implemented by the ChannelListener and Membership listeners to receive heartbeat
+ * notifications from the Channel
+ * @author Filip Hanik
+ * @version 1.0
+ * @see Channel
+ * @see Channel#heartbeat()
+ */
+public interface Heartbeat {
+
+ /**
+ * Heartbeat invokation for resources cleanup etc
+ */
+ public void heartbeat();
+
}
Propchange: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/Heartbeat.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/Heartbeat.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/LocalStrings.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/LocalStrings.properties
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ManagedChannel.java
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ManagedChannel.java?view=diff&rev=467206&r1=467205&r2=467206
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ManagedChannel.java (original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ManagedChannel.java Mon Oct 23 19:45:46 2006
@@ -1,78 +1,78 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.catalina.tribes;
-
-import java.util.Iterator;
-
-/**
- * Channel interface
- * A managed channel interface gives you access to the components of the channels
- * such as senders, receivers, interceptors etc for configurations purposes
- * @author Filip Hanik
- * @version $Revision: 304032 $, $Date: 2005-07-27 10:11:55 -0500 (Wed, 27 Jul 2005) $
- */
-public interface ManagedChannel extends Channel {
-
- /**
- * Sets the channel sender
- * @param sender ChannelSender
- * @see ChannelSender
- */
- public void setChannelSender(ChannelSender sender);
-
- /**
- * Sets the channel receiver
- * @param receiver ChannelReceiver
- * @see ChannelReceiver
- */
- public void setChannelReceiver(ChannelReceiver receiver);
-
- /**
- * Sets the membership service
- * @param service MembershipService
- * @see MembershipService
- */
- public void setMembershipService(MembershipService service);
-
- /**
- * returns the channel sender
- * @return ChannelSender
- * @see ChannelSender
- */
- public ChannelSender getChannelSender();
-
- /**
- * returns the channel receiver
- * @return ChannelReceiver
- * @see ChannelReceiver
- */
- public ChannelReceiver getChannelReceiver();
-
- /**
- * Returns the membership service
- * @return MembershipService
- * @see MembershipService
- */
- public MembershipService getMembershipService();
-
- /**
- * Returns the interceptor stack
- * @return Iterator
- * @see Channel#addInterceptor(ChannelInterceptor)
- */
- public Iterator getInterceptors();
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.catalina.tribes;
+
+import java.util.Iterator;
+
+/**
+ * Channel interface
+ * A managed channel interface gives you access to the components of the channels
+ * such as senders, receivers, interceptors etc for configurations purposes
+ * @author Filip Hanik
+ * @version $Revision$, $Date$
+ */
+public interface ManagedChannel extends Channel {
+
+ /**
+ * Sets the channel sender
+ * @param sender ChannelSender
+ * @see ChannelSender
+ */
+ public void setChannelSender(ChannelSender sender);
+
+ /**
+ * Sets the channel receiver
+ * @param receiver ChannelReceiver
+ * @see ChannelReceiver
+ */
+ public void setChannelReceiver(ChannelReceiver receiver);
+
+ /**
+ * Sets the membership service
+ * @param service MembershipService
+ * @see MembershipService
+ */
+ public void setMembershipService(MembershipService service);
+
+ /**
+ * returns the channel sender
+ * @return ChannelSender
+ * @see ChannelSender
+ */
+ public ChannelSender getChannelSender();
+
+ /**
+ * returns the channel receiver
+ * @return ChannelReceiver
+ * @see ChannelReceiver
+ */
+ public ChannelReceiver getChannelReceiver();
+
+ /**
+ * Returns the membership service
+ * @return MembershipService
+ * @see MembershipService
+ */
+ public MembershipService getMembershipService();
+
+ /**
+ * Returns the interceptor stack
+ * @return Iterator
+ * @see Channel#addInterceptor(ChannelInterceptor)
+ */
+ public Iterator getInterceptors();
+}
Propchange: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ManagedChannel.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ManagedChannel.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/Member.java
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/Member.java?view=diff&rev=467206&r1=467205&r2=467206
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/Member.java (original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/Member.java Mon Oct 23 19:45:46 2006
@@ -1,110 +1,110 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.catalina.tribes;
-
-/**
- * The Member interface, defines a member in the group.
- * Each member can carry a set of properties, defined by the actual implementation.<BR>
- * A member is identified by the host/ip/uniqueId<br>
- * The host is what interface the member is listening to, to receive data<br>
- * The port is what port the member is listening to, to receive data<br>
- * The uniqueId defines the session id for the member. This is an important feature
- * since a member that has crashed and the starts up again on the same port/host is
- * not guaranteed to be the same member, so no state transfers will ever be confused
- * @author Filip Hanik
- * @version $Revision: 303950 $, $Date: 2005-06-09 15:38:30 -0500 (Thu, 09 Jun 2005) $
- */
-
-
-public interface Member {
-
- /**
- * When a member leaves the cluster, the payload of the memberDisappeared member
- * will be the following bytes. This indicates a soft shutdown, and not a crash
- */
- public static final byte[] SHUTDOWN_PAYLOAD = new byte[] {66, 65, 66, 89, 45, 65, 76, 69, 88};
-
- /**
- * Returns the name of this node, should be unique within the group.
- */
- public String getName();
-
- /**
- * Returns the listen host for the ChannelReceiver implementation
- * @return IPv4 or IPv6 representation of the host address this member listens to incoming data
- * @see ChannelReceiver
- */
- public byte[] getHost();
-
- /**
- * Returns the listen port for the ChannelReceiver implementation
- * @return IPv4 or IPv6 representation of the host address this member listens to incoming data
- * @see ChannelReceiver
- */
- public int getPort();
-
- /**
- * Contains information on how long this member has been online.
- * The result is the number of milli seconds this member has been
- * broadcasting its membership to the group.
- * @return nr of milliseconds since this member started.
- */
- public long getMemberAliveTime();
-
- /**
- * The current state of the member
- * @return boolean - true if the member is functioning correctly
- */
- public boolean isReady();
- /**
- * The current state of the member
- * @return boolean - true if the member is suspect, but the crash has not been confirmed
- */
- public boolean isSuspect();
-
- /**
- *
- * @return boolean - true if the member has been confirmed to malfunction
- */
- public boolean isFailing();
-
- /**
- * returns a UUID unique for this member over all sessions.
- * If the member crashes and restarts, the uniqueId will be different.
- * @return byte[]
- */
- public byte[] getUniqueId();
-
- /**
- * returns the payload associated with this member
- * @return byte[]
- */
- public byte[] getPayload();
-
- /**
- * returns the command associated with this member
- * @return byte[]
- */
- public byte[] getCommand();
-
- /**
- * Domain for this cluster
- * @return byte[]
- */
- public byte[] getDomain();
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.catalina.tribes;
+
+/**
+ * The Member interface, defines a member in the group.
+ * Each member can carry a set of properties, defined by the actual implementation.<BR>
+ * A member is identified by the host/ip/uniqueId<br>
+ * The host is what interface the member is listening to, to receive data<br>
+ * The port is what port the member is listening to, to receive data<br>
+ * The uniqueId defines the session id for the member. This is an important feature
+ * since a member that has crashed and the starts up again on the same port/host is
+ * not guaranteed to be the same member, so no state transfers will ever be confused
+ * @author Filip Hanik
+ * @version $Revision$, $Date$
+ */
+
+
+public interface Member {
+
+ /**
+ * When a member leaves the cluster, the payload of the memberDisappeared member
+ * will be the following bytes. This indicates a soft shutdown, and not a crash
+ */
+ public static final byte[] SHUTDOWN_PAYLOAD = new byte[] {66, 65, 66, 89, 45, 65, 76, 69, 88};
+
+ /**
+ * Returns the name of this node, should be unique within the group.
+ */
+ public String getName();
+
+ /**
+ * Returns the listen host for the ChannelReceiver implementation
+ * @return IPv4 or IPv6 representation of the host address this member listens to incoming data
+ * @see ChannelReceiver
+ */
+ public byte[] getHost();
+
+ /**
+ * Returns the listen port for the ChannelReceiver implementation
+ * @return IPv4 or IPv6 representation of the host address this member listens to incoming data
+ * @see ChannelReceiver
+ */
+ public int getPort();
+
+ /**
+ * Contains information on how long this member has been online.
+ * The result is the number of milli seconds this member has been
+ * broadcasting its membership to the group.
+ * @return nr of milliseconds since this member started.
+ */
+ public long getMemberAliveTime();
+
+ /**
+ * The current state of the member
+ * @return boolean - true if the member is functioning correctly
+ */
+ public boolean isReady();
+ /**
+ * The current state of the member
+ * @return boolean - true if the member is suspect, but the crash has not been confirmed
+ */
+ public boolean isSuspect();
+
+ /**
+ *
+ * @return boolean - true if the member has been confirmed to malfunction
+ */
+ public boolean isFailing();
+
+ /**
+ * returns a UUID unique for this member over all sessions.
+ * If the member crashes and restarts, the uniqueId will be different.
+ * @return byte[]
+ */
+ public byte[] getUniqueId();
+
+ /**
+ * returns the payload associated with this member
+ * @return byte[]
+ */
+ public byte[] getPayload();
+
+ /**
+ * returns the command associated with this member
+ * @return byte[]
+ */
+ public byte[] getCommand();
+
+ /**
+ * Domain for this cluster
+ * @return byte[]
+ */
+ public byte[] getDomain();
+}
Propchange: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/Member.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/Member.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/MembershipListener.java
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/MembershipListener.java?view=diff&rev=467206&r1=467205&r2=467206
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/MembershipListener.java (original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/MembershipListener.java Mon Oct 23 19:45:46 2006
@@ -1,45 +1,45 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.catalina.tribes;
-
-/**
- * The MembershipListener interface is used as a callback to the
- * membership service. It has two methods that will notify the listener
- * when a member has joined the group and when a member has disappeared (crashed)
- *
- * @author Filip Hanik
- * @version $Revision: 302726 $, $Date: 2004-02-27 08:59:07 -0600 (Fri, 27 Feb 2004) $
- */
-
-
-public interface MembershipListener {
- /**
- * A member was added to the group
- * @param member Member - the member that was added
- */
- public void memberAdded(Member member);
-
- /**
- * A member was removed from the group<br>
- * If the member left voluntarily, the payload will contain the Member.SHUTDOWN_PAYLOAD data
- * @param member Member
- * @see Member#SHUTDOWN_PAYLOAD
- */
- public void memberDisappeared(Member member);
-
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.catalina.tribes;
+
+/**
+ * The MembershipListener interface is used as a callback to the
+ * membership service. It has two methods that will notify the listener
+ * when a member has joined the group and when a member has disappeared (crashed)
+ *
+ * @author Filip Hanik
+ * @version $Revision$, $Date$
+ */
+
+
+public interface MembershipListener {
+ /**
+ * A member was added to the group
+ * @param member Member - the member that was added
+ */
+ public void memberAdded(Member member);
+
+ /**
+ * A member was removed from the group<br>
+ * If the member left voluntarily, the payload will contain the Member.SHUTDOWN_PAYLOAD data
+ * @param member Member
+ * @see Member#SHUTDOWN_PAYLOAD
+ */
+ public void memberDisappeared(Member member);
+
}
Propchange: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/MembershipListener.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/MembershipListener.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/MembershipService.java
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/MembershipService.java?view=diff&rev=467206&r1=467205&r2=467206
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/MembershipService.java (original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/MembershipService.java Mon Oct 23 19:45:46 2006
@@ -1,135 +1,135 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.catalina.tribes;
-
-
-/**
- * MembershipService Interface<br>
- * The <code>MembershipService</code> interface is the membership component
- * at the bottom layer, the IO layer (for layers see the javadoc for the {@link Channel} interface).<br>
- * @author Filip Hanik
- * @version $Revision: 378093 $, $Date: 2006-02-15 15:13:45 -0600 (Wed, 15 Feb 2006) $
- */
-
-
-public interface MembershipService {
-
- public static final int MBR_RX = Channel.MBR_RX_SEQ;
- public static final int MBR_TX = Channel.MBR_TX_SEQ;
-
- /**
- * Sets the properties for the membership service. This must be called before
- * the <code>start()</code> method is called.
- * The properties are implementation specific.
- * @param properties - to be used to configure the membership service.
- */
- public void setProperties(java.util.Properties properties);
- /**
- * Returns the properties for the configuration used.
- */
- public java.util.Properties getProperties();
- /**
- * Starts the membership service. If a membership listeners is added
- * the listener will start to receive membership events.
- * Performs a start level 1 and 2
- * @throws java.lang.Exception if the service fails to start.
- */
- public void start() throws java.lang.Exception;
-
- /**
- * Starts the membership service. If a membership listeners is added
- * the listener will start to receive membership events.
- * @param level - level MBR_RX starts listening for members, level MBR_TX
- * starts broad casting the server
- * @throws java.lang.Exception if the service fails to start.
- * @throws java.lang.IllegalArgumentException if the level is incorrect.
- */
- public void start(int level) throws java.lang.Exception;
-
-
- /**
- * Starts the membership service. If a membership listeners is added
- * the listener will start to receive membership events.
- * @param level - level MBR_RX stops listening for members, level MBR_TX
- * stops broad casting the server
- * @throws java.lang.Exception if the service fails to stop
- * @throws java.lang.IllegalArgumentException if the level is incorrect.
- */
-
- public void stop(int level);
-
- /**
- * @return true if the the group contains members
- */
- public boolean hasMembers();
-
-
- /**
- *
- * @param mbr Member
- * @return Member
- */
- public Member getMember(Member mbr);
- /**
- * Returns a list of all the members in the cluster.
- */
-
- public Member[] getMembers();
-
- /**
- * Returns the member object that defines this member
- */
- public Member getLocalMember(boolean incAliveTime);
-
- /**
- * Return all members by name
- */
- public String[] getMembersByName() ;
-
- /**
- * Return the member by name
- */
- public Member findMemberByName(String name) ;
-
- /**
- * Sets the local member properties for broadcasting
- */
- public void setLocalMemberProperties(String listenHost, int listenPort);
-
- /**
- * Sets the membership listener, only one listener can be added.
- * If you call this method twice, the last listener will be used.
- * @param listener The listener
- */
- public void setMembershipListener(MembershipListener listener);
-
- /**
- * removes the membership listener.
- */
- public void removeMembershipListener();
-
- /**
- * Set a payload to be broadcasted with each membership
- * broadcast.
- * @param payload byte[]
- */
- public void setPayload(byte[] payload);
-
- public void setDomain(byte[] domain);
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.catalina.tribes;
+
+
+/**
+ * MembershipService Interface<br>
+ * The <code>MembershipService</code> interface is the membership component
+ * at the bottom layer, the IO layer (for layers see the javadoc for the {@link Channel} interface).<br>
+ * @author Filip Hanik
+ * @version $Revision$, $Date$
+ */
+
+
+public interface MembershipService {
+
+ public static final int MBR_RX = Channel.MBR_RX_SEQ;
+ public static final int MBR_TX = Channel.MBR_TX_SEQ;
+
+ /**
+ * Sets the properties for the membership service. This must be called before
+ * the <code>start()</code> method is called.
+ * The properties are implementation specific.
+ * @param properties - to be used to configure the membership service.
+ */
+ public void setProperties(java.util.Properties properties);
+ /**
+ * Returns the properties for the configuration used.
+ */
+ public java.util.Properties getProperties();
+ /**
+ * Starts the membership service. If a membership listeners is added
+ * the listener will start to receive membership events.
+ * Performs a start level 1 and 2
+ * @throws java.lang.Exception if the service fails to start.
+ */
+ public void start() throws java.lang.Exception;
+
+ /**
+ * Starts the membership service. If a membership listeners is added
+ * the listener will start to receive membership events.
+ * @param level - level MBR_RX starts listening for members, level MBR_TX
+ * starts broad casting the server
+ * @throws java.lang.Exception if the service fails to start.
+ * @throws java.lang.IllegalArgumentException if the level is incorrect.
+ */
+ public void start(int level) throws java.lang.Exception;
+
+
+ /**
+ * Starts the membership service. If a membership listeners is added
+ * the listener will start to receive membership events.
+ * @param level - level MBR_RX stops listening for members, level MBR_TX
+ * stops broad casting the server
+ * @throws java.lang.Exception if the service fails to stop
+ * @throws java.lang.IllegalArgumentException if the level is incorrect.
+ */
+
+ public void stop(int level);
+
+ /**
+ * @return true if the the group contains members
+ */
+ public boolean hasMembers();
+
+
+ /**
+ *
+ * @param mbr Member
+ * @return Member
+ */
+ public Member getMember(Member mbr);
+ /**
+ * Returns a list of all the members in the cluster.
+ */
+
+ public Member[] getMembers();
+
+ /**
+ * Returns the member object that defines this member
+ */
+ public Member getLocalMember(boolean incAliveTime);
+
+ /**
+ * Return all members by name
+ */
+ public String[] getMembersByName() ;
+
+ /**
+ * Return the member by name
+ */
+ public Member findMemberByName(String name) ;
+
+ /**
+ * Sets the local member properties for broadcasting
+ */
+ public void setLocalMemberProperties(String listenHost, int listenPort);
+
+ /**
+ * Sets the membership listener, only one listener can be added.
+ * If you call this method twice, the last listener will be used.
+ * @param listener The listener
+ */
+ public void setMembershipListener(MembershipListener listener);
+
+ /**
+ * removes the membership listener.
+ */
+ public void removeMembershipListener();
+
+ /**
+ * Set a payload to be broadcasted with each membership
+ * broadcast.
+ * @param payload byte[]
+ */
+ public void setPayload(byte[] payload);
+
+ public void setDomain(byte[] domain);
+
+}
Propchange: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/MembershipService.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/MembershipService.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/MessageListener.java
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/MessageListener.java?view=diff&rev=467206&r1=467205&r2=467206
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/MessageListener.java (original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/MessageListener.java Mon Oct 23 19:45:46 2006
@@ -1,43 +1,43 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.catalina.tribes;
-
-/**
- *
- * <p>Title: MessageListener</p>
- *
- * <p>Description: The listener to be registered with the ChannelReceiver, internal Tribes component</p>
- *
- * @author Filip Hanik
- * @version 1.0
- */
-
-public interface MessageListener {
-
- /**
- * Receive a message from the IO components in the Channel stack
- * @param msg ChannelMessage
- */
- public void messageReceived(ChannelMessage msg);
-
- public boolean accept(ChannelMessage msg);
-
- public boolean equals(Object listener);
-
- public int hashCode();
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.catalina.tribes;
+
+/**
+ *
+ * <p>Title: MessageListener</p>
+ *
+ * <p>Description: The listener to be registered with the ChannelReceiver, internal Tribes component</p>
+ *
+ * @author Filip Hanik
+ * @version 1.0
+ */
+
+public interface MessageListener {
+
+ /**
+ * Receive a message from the IO components in the Channel stack
+ * @param msg ChannelMessage
+ */
+ public void messageReceived(ChannelMessage msg);
+
+ public boolean accept(ChannelMessage msg);
+
+ public boolean equals(Object listener);
+
+ public int hashCode();
+
+}
Propchange: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/MessageListener.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/MessageListener.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/RemoteProcessException.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/RemoteProcessException.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org