Java Doc for MemberImpl.java in  » Sevlet-Container » apache-tomcat-6.0.14 » org » apache » catalina » tribes » membership » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Sevlet Container » apache tomcat 6.0.14 » org.apache.catalina.tribes.membership 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.catalina.tribes.membership.MemberImpl

All known Subclasses:   org.apache.catalina.tribes.membership.StaticMember,
MemberImpl
public class MemberImpl implements Member,java.io.Externalizable(Code)
A membership implementation using simple multicast. This is the representation of a multicast member. Carries the host, and port of the this or other cluster nodes.
author:
   Filip Hanik
version:
   $Revision: 538977 $, $Date: 2007-05-17 17:43:49 +0200 (jeu., 17 mai 2007) $


Field Summary
final public static transient  StringMEMBER_NAME
    
final public static transient  StringTCP_LISTEN_HOST
    
final public static transient  StringTCP_LISTEN_PORT
    
final public static transient  byte[]TRIBES_MBR_BEGIN
    
final public static transient  byte[]TRIBES_MBR_END
    
protected  byte[]command
    
protected transient  byte[]dataPkg
    
protected  byte[]domain
     Domain if we want to filter based on domain.
protected  byte[]host
    
protected transient  Stringhostname
    
protected  longmemberAliveTime
    
protected  intmsgCount
    
protected  byte[]payload
     Custom payload that an app framework can broadcast Also used to transport stop command.
protected  intport
    
protected  intsecurePort
    
protected transient  longserviceStartTime
    
protected  byte[]uniqueId
    

Constructor Summary
public  MemberImpl()
    
public  MemberImpl(String host, int port, long aliveTime)
    
public  MemberImpl(String host, int port, long aliveTime, byte[] payload)
    

Method Summary
public static  StringbToS(byte[] data)
    
public static  StringbToS(byte[] data, int max)
    
public  booleanequals(Object o)
    
public  byte[]getCommand()
    
public  byte[]getData()
     Create a data package to send over the wire representing this member.
public  byte[]getData(boolean getalive)
    
public  byte[]getData(boolean getalive, boolean reset)
    
public  intgetDataLength()
    
public  byte[]getDomain()
    
public  byte[]getHost()
    
public  StringgetHostname()
    
public static  MemberImplgetMember(byte[] data, MemberImpl member)
    
public static  MemberImplgetMember(byte[] data, int offset, int length, MemberImpl member)
    
public static  MemberImplgetMember(byte[] data)
    
public static  MemberImplgetMember(byte[] data, int offset, int length)
    
public  longgetMemberAliveTime()
     Contains information on how long this member has been online.
public  StringgetName()
    
public  byte[]getPayload()
    
public  intgetPort()
    
public  intgetSecurePort()
    
public  longgetServiceStartTime()
    
public  byte[]getUniqueId()
    
public  inthashCode()
    
protected  voidinc()
     Increment the message count.
public  booleanisFailing()
    
public  booleanisReady()
    
public  booleanisSuspect()
    
public  voidreadExternal(ObjectInput in)
    
public  voidsetCommand(byte[] command)
    
public  voidsetDomain(byte[] domain)
    
public  voidsetHost(byte[] host)
    
public  voidsetHostname(String host)
    
public  voidsetMemberAliveTime(long time)
    
public  voidsetMsgCount(int msgCount)
    
public  voidsetPayload(byte[] payload)
    
public  voidsetPort(int port)
    
public  voidsetSecurePort(int securePort)
    
public  voidsetServiceStartTime(long serviceStartTime)
    
public  voidsetUniqueId(byte[] uniqueId)
    
public  StringtoString()
    
public  voidwriteExternal(ObjectOutput out)
    

Field Detail
MEMBER_NAME
final public static transient String MEMBER_NAME(Code)



TCP_LISTEN_HOST
final public static transient String TCP_LISTEN_HOST(Code)



TCP_LISTEN_PORT
final public static transient String TCP_LISTEN_PORT(Code)
Public properties specific to this implementation



TRIBES_MBR_BEGIN
final public static transient byte[] TRIBES_MBR_BEGIN(Code)



TRIBES_MBR_END
final public static transient byte[] TRIBES_MBR_END(Code)



command
protected byte[] command(Code)
Command, so that the custom payload doesn't have to be used This is for internal tribes use, such as SHUTDOWN_COMMAND



dataPkg
protected transient byte[] dataPkg(Code)
To avoid serialization over and over again, once the local dataPkg has been set, we use that to transmit data



domain
protected byte[] domain(Code)
Domain if we want to filter based on domain.



host
protected byte[] host(Code)
The listen host for this member



hostname
protected transient String hostname(Code)



memberAliveTime
protected long memberAliveTime(Code)
The number of milliseconds since this members was created, is kept track of using the start time



msgCount
protected int msgCount(Code)
Counter for how many broadcast messages have been sent from this member



payload
protected byte[] payload(Code)
Custom payload that an app framework can broadcast Also used to transport stop command.



port
protected int port(Code)
The tcp listen port for this member



securePort
protected int securePort(Code)
The tcp/SSL listen port for this member



serviceStartTime
protected transient long serviceStartTime(Code)
For the local member only



uniqueId
protected byte[] uniqueId(Code)
Unique session Id for this member




Constructor Detail
MemberImpl
public MemberImpl()(Code)
Empty constructor for serialization



MemberImpl
public MemberImpl(String host, int port, long aliveTime) throws IOException(Code)
Construct a new member object
Parameters:
  name - - the name of this member, cluster unique
Parameters:
  domain - - the cluster domain name of this member
Parameters:
  host - - the tcp listen host
Parameters:
  port - - the tcp listen port



MemberImpl
public MemberImpl(String host, int port, long aliveTime, byte[] payload) throws IOException(Code)




Method Detail
bToS
public static String bToS(byte[] data)(Code)



bToS
public static String bToS(byte[] data, int max)(Code)



equals
public boolean equals(Object o)(Code)
Returns true if the param o is a McastMember with the same name
Parameters:
  o -



getCommand
public byte[] getCommand()(Code)



getData
public byte[] getData()(Code)
Create a data package to send over the wire representing this member. This is faster than serialization. - the bytes for this member deserialized
throws:
  Exception -



getData
public byte[] getData(boolean getalive)(Code)
Highly optimized version of serializing a member into a byte array Returns a cached byte[] reference, do not modify this data
Parameters:
  getalive - boolean byte[]



getData
public byte[] getData(boolean getalive, boolean reset)(Code)

Parameters:
  getalive - boolean - calculate memberAlive time
Parameters:
  reset - boolean - reset the cached data package, and create a new one byte[]



getDataLength
public int getDataLength()(Code)



getDomain
public byte[] getDomain()(Code)



getHost
public byte[] getHost()(Code)
Return the TCP listen host for this member IP address or host name



getHostname
public String getHostname()(Code)



getMember
public static MemberImpl getMember(byte[] data, MemberImpl member)(Code)
Deserializes a member from data sent over the wire
Parameters:
  data - - the bytes received a member object.



getMember
public static MemberImpl getMember(byte[] data, int offset, int length, MemberImpl member)(Code)



getMember
public static MemberImpl getMember(byte[] data)(Code)



getMember
public static MemberImpl getMember(byte[] data, int offset, int length)(Code)



getMemberAliveTime
public long getMemberAliveTime()(Code)
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 cluster. nr of milliseconds since this member started.



getName
public String getName()(Code)
Return the name of this object a unique name to the cluster



getPayload
public byte[] getPayload()(Code)



getPort
public int getPort()(Code)
Return the listen port of this member - tcp listen port



getSecurePort
public int getSecurePort()(Code)



getServiceStartTime
public long getServiceStartTime()(Code)



getUniqueId
public byte[] getUniqueId()(Code)



hashCode
public int hashCode()(Code)

See Also:   java.lang.Object.hashCode The hash code



inc
protected void inc()(Code)
Increment the message count.



isFailing
public boolean isFailing()(Code)



isReady
public boolean isReady()(Code)



isSuspect
public boolean isSuspect()(Code)



readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException(Code)



setCommand
public void setCommand(byte[] command)(Code)



setDomain
public void setDomain(byte[] domain)(Code)



setHost
public void setHost(byte[] host)(Code)



setHostname
public void setHostname(String host) throws IOException(Code)



setMemberAliveTime
public void setMemberAliveTime(long time)(Code)



setMsgCount
public void setMsgCount(int msgCount)(Code)



setPayload
public void setPayload(byte[] payload)(Code)



setPort
public void setPort(int port)(Code)



setSecurePort
public void setSecurePort(int securePort)(Code)



setServiceStartTime
public void setServiceStartTime(long serviceStartTime)(Code)



setUniqueId
public void setUniqueId(byte[] uniqueId)(Code)



toString
public String toString()(Code)
String representation of this object



writeExternal
public void writeExternal(ObjectOutput out) throws IOException(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.